Skip to content

The CloudEvents formats

Write and read CloudEvents as envelope.Formats, in binary mode or structured mode.

gitlab.com/phpboyscout/go/envelope-cloudevents is the CloudEvents adapter for go/envelope. It is released (v0.1.0) and is the default format of every go/messaging adapter.

cloudevents.Binary(cloudevents.NATS) // attributes in prefixed headers, payload in the body
cloudevents.Structured()             // the whole event as one JSON object in the body

It replaces gitlab.com/phpboyscout/go/cloudevents, and depends on go/envelope and go/errors and nothing else. It never imports a transport or the CloudEvents SDK; see what these modules do not do.

Start here

Getting started encodes an event, sends it over NATS and reads it back.

Do a task

Understand it

Look something up