broker

package
v0.10.9 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

type Broker struct {
	*server.Server
	// contains filtered or unexported fields
}

Broker is a broker node

func NewBroker

func NewBroker(cluster cluster.Cluster, opts ...Option) *Broker

NewBroker creates a new broker node

func (*Broker) Start

func (n *Broker) Start() error

Start starts the node

func (*Broker) Stop

func (n *Broker) Stop() error

Stop stops the node

type Option

type Option func(opts *brokerOptions)

Option is a broker option

func WithName

func WithName(name string) Option

WithName sets the pod name

func WithNamespace

func WithNamespace(namespace string) Option

WithNamespace sets the pod namespace

func WithNode

func WithNode(node string) Option

WithNode sets the pod node

type PrimitiveRegistry

type PrimitiveRegistry struct {
	// contains filtered or unexported fields
}

PrimitiveRegistry is a primitive registry The registry is not thread safe!

func (*PrimitiveRegistry) AddPrimitive

func (r *PrimitiveRegistry) AddPrimitive(id brokerapi.PrimitiveId, primitive brokerapi.PrimitiveAddress) error

func (*PrimitiveRegistry) LookupPrimitive

func (*PrimitiveRegistry) RemovePrimitive

func (r *PrimitiveRegistry) RemovePrimitive(id brokerapi.PrimitiveId) error

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(primitives *PrimitiveRegistry) *Server

func (*Server) LookupPrimitive

Jump to

Keyboard shortcuts

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