Registry / messaging / cloudevents-sdk-go

cloudevents-sdk-go

JSON →
library2.16.2+incompatiblegogounverified

A Go SDK for the CloudEvents specification, enabling event creation, parsing, and transport.

go get github.com/cloudevents/sdk-go
INSTALL
IMPORT
SIG · CLOUDEVENTS-SDK-GO
C
cloudevents-sdk-go
messaginggov2.16.2+incompatible
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.

cloudevents
github.com/cloudevents/sdk-go/v2

Creates a new CloudEvent and sets its source and type.

package main import ( "context" "fmt" cloudevents "github.com/cloudevents/sdk-go/v2" ) func main() { event := cloudevents.NewEvent() event.SetSource("example/uri") event.SetType("example.type") fmt.Println(event.String()) }
Debug
Known issues
breakingVersion 2.x has breaking changes from v1.x, including API and import path changes.
fix
Use v2 import path and update code accordingly.
affects: >=2.0.0
Upgrade
Version history
2.16.2+incompatiblelatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
16
Amazon
1
OpenAI (training)
1
Resources