logbroker

package
v0.0.0-...-2f05a08 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2017 License: Apache-2.0 Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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