ingress

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: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DopplerPool

type DopplerPool interface {
	RegisterDoppler(addr string)
	Subscribe(dopplerAddr string, ctx context.Context, req *loggregator_v2.EgressBatchRequest) (loggregator_v2.Egress_BatchedReceiverClient, error)

	Close(dopplerAddr string)
}

DopplerPool creates a pool of doppler gRPC connections

type Finder

type Finder interface {
	Next() plumbing.Event
}

Finder yields events that tell us what dopplers are available.

type GRPCConnector

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

GRPCConnector establishes GRPC connections to dopplers and allows calls to Firehose, Stream, etc to be reduced down to a single Receiver.

func NewGRPCConnector

func NewGRPCConnector(
	bufferSize int,
	pool DopplerPool,
	f Finder,
	m MetricClient,
) *GRPCConnector

NewGRPCConnector creates a new GRPCConnector.

func (*GRPCConnector) Subscribe

func (c *GRPCConnector) Subscribe(ctx context.Context, req *loggregator_v2.EgressBatchRequest) (recv func() (*loggregator_v2.Envelope, error), err error)

Subscribe returns a Receiver that yields all corresponding messages from Doppler

type MetricClient

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

MetricClient creates new CounterMetrics to be emitted periodically.

type Pool

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

func NewPool

func NewPool(size int, opts ...grpc.DialOption) *Pool

func (*Pool) Close

func (p *Pool) Close(dopplerAddr string)

func (*Pool) RegisterDoppler

func (p *Pool) RegisterDoppler(addr string)

Jump to

Keyboard shortcuts

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