Registry / serialization / cloudevents-sdk-go-binding-format-protobuf-v2

cloudevents-sdk-go-binding-format-protobuf-v2

JSON →
library2.16.2gogounverified

Protobuf format binding for the CloudEvents SDK in Go.

go get github.com/cloudevents/sdk-go/binding/format/protobuf/v2
INSTALL
IMPORT
SIG · CLOUDEVENTS-SDK-GO
C
cloudevents-sdk-go-binding-format-protobuf-v2
serializationgov2.16.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

protobuf
github.com/cloudevents/sdk-go/binding/format/protobuf/v2

Marshal a CloudEvent to protobuf format.

package main import ( "fmt" cloudevents "github.com/cloudevents/sdk-go/v2" "github.com/cloudevents/sdk-go/binding/format/protobuf/v2" ) func main() { event := cloudevents.NewEvent() event.SetID("123") data, _ := protobuf.Marshal(event) fmt.Println(string(data)) }
Debug
Known issues
breakingThis package is part of the CloudEvents SDK v2; ensure you import the correct major version.
fix
Use `go get github.com/cloudevents/sdk-go/v2` and import as shown.
affects: >=2.0.0
Upgrade
Version history
2.16.2latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
20
OpenAI (training)
1
Resources
cloudevents-sdk-go-binding-format-protobuf-v2 — go get cloudevents-sdk-go-binding-format-protobuf-v2 · libregistry