egress

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoshMetricsServer

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

func NewServer

func NewServer(m chan *definitions.Event, t tokenChecker, opts ...ServerOpt) *BoshMetricsServer

NewServer returns a BoshMetricsServer. It serves bosh metrics via a grpc connections from clients.

func (*BoshMetricsServer) BoshMetrics

BoshMetrics is the grpc handler that serves EgressRequests. It verifies auth tokens from the `authorization` metadata. It returns an error if the auth token is missing or invalid.

func (*BoshMetricsServer) Start

func (s *BoshMetricsServer) Start() func()

Start spins up a new go routine that distributes metrics to each subscription. It returns a shutdown function which blocks until all subscriptions are drained.

type ServerOpt

type ServerOpt func(*BoshMetricsServer)

func WithSubscriptionBufferSize

func WithSubscriptionBufferSize(n int) ServerOpt

Jump to

Keyboard shortcuts

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