logbroker

package
v0.0.0-...-be68371 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2017 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogBroker

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

LogBroker coordinates log subscriptions to services and tasks. Clients can publish and subscribe to logs channels.

Log subscriptions are pushed to the work nodes by creating log subscsription tasks. As such, the LogBroker also acts as an orchestrator of these tasks.

func New

func New(store *store.MemoryStore) *LogBroker

New initializes and returns a new LogBroker

func (*LogBroker) ListenSubscriptions

func (lb *LogBroker) ListenSubscriptions(request *api.ListenSubscriptionsRequest, stream api.LogBroker_ListenSubscriptionsServer) error

ListenSubscriptions returns a stream of matching subscriptions for the current node

func (*LogBroker) PublishLogs

func (lb *LogBroker) PublishLogs(stream api.LogBroker_PublishLogsServer) (err error)

PublishLogs publishes log messages for a given subscription

func (*LogBroker) Run

func (lb *LogBroker) Run(ctx context.Context) error

Run the log broker

func (*LogBroker) Stop

func (lb *LogBroker) Stop() error

Stop stops the log broker

func (*LogBroker) SubscribeLogs

func (lb *LogBroker) SubscribeLogs(request *api.SubscribeLogsRequest, stream api.Logs_SubscribeLogsServer) error

SubscribeLogs creates a log subscription and streams back logs

Jump to

Keyboard shortcuts

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