egress

package
v0.0.0-...-3ce1eab Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: Apache-2.0, BSD-3-Clause, MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HealthRegistrar

type HealthRegistrar interface {
	Inc(name string)
	Dec(name string)
}

HealthRegistrar provides an interface to record various counters.

type MetricClient

type MetricClient interface {
	NewCounter(name string, opts ...metricemitter.MetricOption) *metricemitter.Counter
	NewGauge(name, unit string, opts ...metricemitter.MetricOption) *metricemitter.Gauge
}

MetricClient creates new CounterMetrics to be emitted periodically.

type Receiver

type Receiver interface {
	Subscribe(ctx context.Context, req *loggregator_v2.EgressBatchRequest) (rx func() (*loggregator_v2.Envelope, error), err error)
}

Receiver creates a function which will receive envelopes on a stream.

type Server

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

Server represents a bridge between inbound data from the Receiver and outbound data on a gRPC stream.

func NewServer

func NewServer(
	r Receiver,
	m MetricClient,
	h HealthRegistrar,
	c context.Context,
	batchSize int,
	batchInterval time.Duration,
	opts ...ServerOption,
) *Server

NewServer is the preferred way to create a new Server.

func (*Server) BatchedReceiver

BatchedReceiver implements the loggregator-api V2 gRPC interface for receiving batches of envelopes. Envelopes will be written to the egress batched receiver server whenever the configured interval or configured batch size is exceeded.

func (*Server) Receiver

Receiver implements the loggregator-api V2 gRPC interface for receiving envelopes from upstream connections.

type ServerOption

type ServerOption func(*Server)

ServerOption represents a function that cancel configure an RLP egress server.

func WithMaxStreams

func WithMaxStreams(conn int64) ServerOption

WithMaxStreams specifies the maximum streams allowed by the RLP egress server.

Jump to

Keyboard shortcuts

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