We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting this error when trying to use event bucket and then read the contents from Cloud Storage.
panic: interface conversion: http.http2StreamError is not http.http2writeFramer: missing method writeFrame goroutine 1 [running]: plugin.lastmoduleinit(0xcce400, 0xc42000e038, 0xccf470, 0x4c, 0xb8fde0) /usr/local/go/src/runtime/plugin.go:60 +0x5e6 plugin.open(0x7ffc13527e00, 0xc, 0x0, 0x0, 0x0) /usr/local/go/src/plugin/plugin_dlopen.go:72 +0x25d plugin.Open(0x7ffc13527e00, 0xc, 0xb, 0x8154e8, 0xc) /usr/local/go/src/plugin/plugin.go:30 +0x35 main.main()
This panic occurs when I instantiate a new client from cloud storage
ctx := context.Background() client, err := storage.NewClient(ctx)
Here's the full code
package main import ( "context" "fmt" "io/ioutil" "log" "cloud.google.com/go/storage" "github.com/kelseyhightower/google-cloud-functions-go/event" ) func F(e event.ObjectChange) (string, error) { log.SetFlags(0) log.Printf("processing object: %s", e.Data.Id) log.Printf("bucket: %s", e.Data.Bucket) log.Printf("filename: %s", e.Data.Name) log.Printf("resource state: %s", e.Data.ResourceState) ctx := context.Background() client, err := storage.NewClient(ctx) if err != nil { log.Fatal(err) } rc, err := client.Bucket(e.Data.Bucket).Object(e.Data.Name).NewReader(ctx) if err != nil { log.Fatal(err) } contents, err := ioutil.ReadAll(rc) rc.Close() if err != nil { log.Fatal(err) } log.Printf("file contents:", contents) return "", nil }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Getting this error when trying to use event bucket and then read the contents from Cloud Storage.
This panic occurs when I instantiate a new client from cloud storage
Here's the full code
The text was updated successfully, but these errors were encountered: