v2

package module
v2.0.0-RC1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2020 License: Apache-2.0 Imports: 8 Imported by: 1,298

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
	NewClientObserved     = client.NewObserved
	NewDefaultClient      = client.NewDefault
	NewHTTPReceiveHandler = client.NewHTTPReceiveHandler

	WithEventDefaulter   = client.WithEventDefaulter
	WithUUIDs            = client.WithUUIDs
	WithTimeNow          = client.WithTimeNow
	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

	NewHTTPResult        = http.NewResult
	NewHTTPRetriesResult = http.NewRetriesResult

	ToMessage = binding.ToMessage

	WriteHTTPRequest = http.WriteRequest

	EnableTracing = observability.EnableTracing

	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
)

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 contains test data and generic tests for testing bindings.
Package test contains test data and generic tests for testing bindings.
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.
cmd
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 recording implementations.
Package observability holds metrics and tracing recording implementations.
Package protocol defines interfaces to decouple the client package from protocol implementations.
Package protocol defines interfaces to decouple the client package from protocol implementations.
amqp
Package amqp implements an AMQP binding using pack.ag/amqp module
Package amqp implements an AMQP binding using pack.ag/amqp module
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
kafka_sarama
Package kafka_sarama implements a Kafka binding using github.com/Shopify/sarama module
Package kafka_sarama implements a Kafka binding using github.com/Shopify/sarama module
nats
Package nats implements the CloudEvent transport implementation using NATS.
Package nats implements the CloudEvent transport implementation using NATS.
pubsub
Package pubsub implements a Pub/Sub binding using google.cloud.com/go/pubsub module
Package pubsub implements a Pub/Sub binding using google.cloud.com/go/pubsub module
pubsub/context
Package context provides the pubsub ProtocolContext.
Package context provides the pubsub ProtocolContext.
pubsub/internal
Package internal provides the internal pubsub Connection type.
Package internal provides the internal pubsub Connection type.
stan
Package stan implements the CloudEvent transport implementation using NATS Streaming.
Package stan implements the CloudEvent transport implementation using NATS Streaming.
test
Package test provides re-usable functions for binding tests.
Package test provides re-usable functions for binding tests.
samples module
Package test holds integration and benchmark tests.
Package test holds integration and benchmark tests.
benchmark/e2e
Package e2e holds end-to-end eventing benchmarks.
Package e2e holds end-to-end eventing benchmarks.
integration/http
Package http contains HTTP integration test helpers.
Package http contains HTTP integration test helpers.
tools module
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