broker

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultName = "mkit.broker.default"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

type Broker interface {
	CeClient() cloudevents.Client
	Options() Options
}

func NewBroker

func NewBroker(opts ...Option) Broker

NewService creates and returns a new Service based on the packages within.

type Option

type Option func(*Options)

func Context

func Context(ctx context.Context) Option

Context specifies a context for the service. Can be used to signal shutdown of the service Can be used for extra option values.

func Name

func Name(n string) Option

Name of the service

func WithEndpoint

func WithEndpoint(endpoint string) Option

type Options

type Options struct {
	Name string

	Endpoint string

	// Alternative options
	Context context.Context
}

Directories

Path Synopsis
cloudevents module
pubsub module

Jump to

Keyboard shortcuts

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