broker

package
v0.0.0-...-f0dc348 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

type Broker struct {
	Monitoring *Monitoring

	Options *Options
	// contains filtered or unexported fields
}

func New

func New(options Options, logger common.Logger) *Broker

func (*Broker) GetClient

func (b *Broker) GetClient(clientId string) (*client, bool)

GetClient returns the client struct associated with the client id.

func (*Broker) GetClientsJSON

func (b *Broker) GetClientsJSON() []api.ClientJSON

func (*Broker) GetEventsJSON

func (b *Broker) GetEventsJSON() []api.EventInfoJSON

func (*Broker) GetLogsByPattern

func (b *Broker) GetLogsByPattern(pattern string) (api.GetLogsResponse, error)

func (*Broker) GetRequestSender

func (b *Broker) GetRequestSender(req *cellaserv.Request) (*client, error)

func (*Broker) GetService

func (b *Broker) GetService(name string, identification string) (srvc *service, err error)

GetService returns the service identified by the name and identification in argument, or an error if not found.

func (*Broker) GetServicesJSON

func (b *Broker) GetServicesJSON() []api.ServiceJSON

func (*Broker) Quit

func (b *Broker) Quit() chan struct{}

Quit returns the quit broker channel

func (*Broker) RenameClientFromRequest

func (b *Broker) RenameClientFromRequest(req *cellaserv.Request, name string)

func (*Broker) Run

func (b *Broker) Run(ctx context.Context) error

func (*Broker) SpyService

func (b *Broker) SpyService(c *client, srvc *service)

spyByRequest finds the sender of the request and add it to the

func (*Broker) Started

func (b *Broker) Started() chan struct{}

Started returns the started broker channel

func (*Broker) StartedWithCellaserv

func (b *Broker) StartedWithCellaserv() chan struct{}

type Monitoring

type Monitoring struct {
	Registry *prometheus.Registry
	// contains filtered or unexported fields
}

type Options

type Options struct {
	ListenAddress         string
	RequestTimeoutSec     time.Duration
	LogsDir               string
	PublishLoggingEnabled bool
}

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

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