broker

package
Version: v0.0.0-...-e652847 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BrokerQueue is the name we use to queueSub to a queue with the broker
	BrokerQueue = "broker_queue"

	// DefaultPoolSize is the default size of the worker pool
	DefaultPoolSize = 5

	// DefaultPoolMaxPending is the default number of requests that can be
	// pending
	DefaultPoolMaxPending = 5

	// DefaultPoolMaxPendingDuration is the default max pending duration for a
	// a request
	DefaultPoolMaxPendingDuration = time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	services.Options

	ActorStorage    storage.ActorStorage
	EnvelopeStorage storage.EnvelopeStorage
	LogStorage      storage.LogStorage
	ProcessManager  *process.Manager

	PoolSize               uint
	PoolMaxPending         uint
	PoolMaxPendingDuration time.Duration
}

Options is used to create a Service

func (Options) NewService

func (o Options) NewService() *Service

NewService returns a new Service

type Service

type Service struct {
	services.BaseService
	Opts Options
	// contains filtered or unexported fields
}

Service is the central node of all envelope exchanges

func New

func New(options Options) *Service

New returns a new Service

func (*Service) Startup

func (s *Service) Startup() error

Startup initialize all the subscriptions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL