v2

package module
v2.0.0-...-87fb6e7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 7 Imported by: 6

Documentation

Overview

Package v2 reexports a subset of the SDK v2 API.

Index

Constants

View Source
const (
	ApplicationXML                  = event.ApplicationXML
	ApplicationJSON                 = event.ApplicationJSON
	TextPlain                       = event.TextPlain
	ApplicationCloudEventsJSON      = event.ApplicationCloudEventsJSON
	ApplicationCloudEventsBatchJSON = event.ApplicationCloudEventsBatchJSON
	Base64                          = event.Base64

	VersionV1  = event.CloudEventsVersionV1
	VersionV03 = event.CloudEventsVersionV03

	EncodingBinary     = binding.EncodingBinary
	EncodingStructured = binding.EncodingStructured
)

Variables

View Source
var (
	StringOfApplicationJSON                 = event.StringOfApplicationJSON
	StringOfApplicationXML                  = event.StringOfApplicationXML
	StringOfTextPlain                       = event.StringOfTextPlain
	StringOfApplicationCloudEventsJSON      = event.StringOfApplicationCloudEventsJSON
	StringOfApplicationCloudEventsBatchJSON = event.StringOfApplicationCloudEventsBatchJSON
	StringOfBase64                          = event.StringOfBase64

	NewClient     = client.New
	NewClientHTTP = client.NewHTTP
	// Deprecated: please use New with the observability options.
	NewClientObserved = client.NewObserved
	// Deprecated: Please use NewClientHTTP with the observability options.
	NewDefaultClient      = client.NewDefault
	NewHTTPReceiveHandler = client.NewHTTPReceiveHandler

	WithEventDefaulter = client.WithEventDefaulter
	WithUUIDs          = client.WithUUIDs
	WithTimeNow        = client.WithTimeNow
	// Deprecated: this is now noop and will be removed in future releases.
	WithTracePropagation = client.WithTracePropagation()

	NewEvent = event.New

	NewResult = protocol.NewResult
	ResultIs  = protocol.ResultIs
	ResultAs  = protocol.ResultAs

	NewReceipt = protocol.NewReceipt

	ResultACK  = protocol.ResultACK
	ResultNACK = protocol.ResultNACK

	IsACK         = protocol.IsACK
	IsNACK        = protocol.IsNACK
	IsUndelivered = protocol.IsUndelivered

	NewHTTPResult        = http.NewResult
	NewHTTPRetriesResult = http.NewRetriesResult

	ToMessage = binding.ToMessage

	WriteHTTPRequest = http.WriteRequest

	ContextWithTarget                    = context.WithTarget
	TargetFromContext                    = context.TargetFrom
	ContextWithRetriesConstantBackoff    = context.WithRetriesConstantBackoff
	ContextWithRetriesLinearBackoff      = context.WithRetriesLinearBackoff
	ContextWithRetriesExponentialBackoff = context.WithRetriesExponentialBackoff

	WithEncodingBinary     = binding.WithForceBinary
	WithEncodingStructured = binding.WithForceStructured

	ParseTimestamp = types.ParseTimestamp
	ParseURIRef    = types.ParseURIRef
	ParseURI       = types.ParseURI

	NewHTTP = http.New

	WithTarget          = http.WithTarget
	WithHeader          = http.WithHeader
	WithShutdownTimeout = http.WithShutdownTimeout
	//WithEncoding           = http.WithEncoding
	//WithStructuredEncoding = http.WithStructuredEncoding // TODO: expose new way
	WithPort                      = http.WithPort
	WithPath                      = http.WithPath
	WithMiddleware                = http.WithMiddleware
	WithListener                  = http.WithListener
	WithRoundTripper              = http.WithRoundTripper
	WithGetHandlerFunc            = http.WithGetHandlerFunc
	WithOptionsHandlerFunc        = http.WithOptionsHandlerFunc
	WithDefaultOptionsHandlerFunc = http.WithDefaultOptionsHandlerFunc
)

Functions

This section is empty.

Types

type Client

type Client = client.Client

type ClientOption

type ClientOption client.Option

type Encoding

type Encoding = binding.Encoding

type Event

type Event = event.Event

type EventContext

type EventContext = event.EventContext

type EventContextV03

type EventContextV03 = event.EventContextV03

type EventContextV1

type EventContextV1 = event.EventContextV1

type HTTPOption

type HTTPOption http.Option

type HTTPProtocol

type HTTPProtocol = http.Protocol

type Message

type Message = binding.Message

type Result

type Result = protocol.Result

type Timestamp

type Timestamp = types.Timestamp

type URIRef

type URIRef = types.URIRef

Directories

Path Synopsis
Package binding defines interfaces for protocol bindings.
Package binding defines interfaces for protocol bindings.
buffering
Package buffering provides APIs for buffered messages.
Package buffering provides APIs for buffered messages.
format
Package format formats structured events.
Package format formats structured events.
spec
Package spec provides spec-version metadata.
Package spec provides spec-version metadata.
test
Package test provides utilities to test binding implementations and transformers.
Package test provides utilities to test binding implementations and transformers.
transformer
Package transformer provides methods for creating event message transformers.
Package transformer provides methods for creating event message transformers.
Package client holds the recommended entry points for interacting with the CloudEvents Golang SDK.
Package client holds the recommended entry points for interacting with the CloudEvents Golang SDK.
test
Package test provides Client test helpers.
Package test provides Client test helpers.
Package context holds the last resort overrides and fyi objects that can be passed to clients and transports added to context.Context objects.
Package context holds the last resort overrides and fyi objects that can be passed to clients and transports added to context.Context objects.
Package event provides primitives to work with CloudEvents specification: https://github.com/cloudevents/spec.
Package event provides primitives to work with CloudEvents specification: https://github.com/cloudevents/spec.
datacodec
Package datacodec holds the data codec registry and adds known encoders and decoders supporting media types such as `application/json` and `application/xml`.
Package datacodec holds the data codec registry and adds known encoders and decoders supporting media types such as `application/json` and `application/xml`.
datacodec/json
Package json holds the encoder/decoder implementation for `application/json`.
Package json holds the encoder/decoder implementation for `application/json`.
datacodec/text
Package text holds the encoder/decoder implementation for `text/plain`.
Package text holds the encoder/decoder implementation for `text/plain`.
datacodec/xml
Package xml holds the encoder/decoder implementation for `application/xml`.
Package xml holds the encoder/decoder implementation for `application/xml`.
Package extensions provides implementations of common event extensions.
Package extensions provides implementations of common event extensions.
Package observability holds metrics and tracing common keys.
Package observability holds metrics and tracing common keys.
Package protocol defines interfaces to decouple the client package from protocol implementations.
Package protocol defines interfaces to decouple the client package from protocol implementations.
gochan
Package gochan implements the CloudEvent transport implementation using go chan.
Package gochan implements the CloudEvent transport implementation using go chan.
http
Package http implements an HTTP binding using net/http module
Package http implements an HTTP binding using net/http module
test
Package test provides re-usable functions for binding tests.
Package test provides re-usable functions for binding tests.
Package test has utilities (asserts, mocks, ...) to use cloudevents in your tests
Package test has utilities (asserts, mocks, ...) to use cloudevents in your tests
Package types implements the CloudEvents type system.
Package types implements the CloudEvents type system.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL