grpcconnector

package
v74.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2017 License: Apache-2.0, BSD-3-Clause, MIT Imports: 16 Imported by: ? 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 DopplerPool

type DopplerPool interface {
	RegisterDoppler(addr string)
	Subscribe(dopplerAddr string, ctx context.Context, req *plumbing.SubscriptionRequest) (plumbing.Doppler_SubscribeClient, error)
	ContainerMetrics(dopplerAddr string, ctx context.Context, req *plumbing.ContainerMetricsRequest) (*plumbing.ContainerMetricsResponse, error)
	RecentLogs(dopplerAddr string, ctx context.Context, req *plumbing.RecentLogsRequest) (*plumbing.RecentLogsResponse, error)

	Close(dopplerAddr string)
}

DopplerPool creates a pool of doppler gRPC connections

type Finder

type Finder interface {
	Next() dopplerservice.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 New

func New(bufferSize int, pool DopplerPool, f Finder, batcher MetaMetricBatcher) *GRPCConnector

New creates a new GRPCConnector.

func (*GRPCConnector) ContainerMetrics

func (c *GRPCConnector) ContainerMetrics(ctx context.Context, appID string) [][]byte

ContainerMetrics returns the current container metrics for an app ID.

func (*GRPCConnector) RecentLogs

func (c *GRPCConnector) RecentLogs(ctx context.Context, appID string) [][]byte

RecentLogs returns the current recent logs for an app ID.

func (*GRPCConnector) Subscribe

Subscribe returns a Receiver that yields all corresponding messages from Doppler

type MetaMetricBatcher

type MetaMetricBatcher interface {
	BatchCounter(name string) metricbatcher.BatchCounterChainer
	BatchAddCounter(name string, delta uint64)
}

type Pool

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

func NewPool

func NewPool(size int, tlsConf *tls.Config) *Pool

func (*Pool) Close

func (p *Pool) Close(dopplerAddr string)

func (*Pool) ContainerMetrics

func (p *Pool) ContainerMetrics(dopplerAddr string, ctx context.Context, req *plumbing.ContainerMetricsRequest) (*plumbing.ContainerMetricsResponse, error)

func (*Pool) RecentLogs

func (p *Pool) RecentLogs(dopplerAddr string, ctx context.Context, req *plumbing.RecentLogsRequest) (*plumbing.RecentLogsResponse, error)

func (*Pool) RegisterDoppler

func (p *Pool) RegisterDoppler(addr string)

func (*Pool) Subscribe

type Receiver

type Receiver interface {
	Recv() ([]byte, error)
}

Receiver yeilds messages from a pool of Dopplers.

Jump to

Keyboard shortcuts

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