Documentation ¶
Index ¶
- type DopplerPool
- type Finder
- type GRPCConnector
- type MetaMetricBatcher
- type Pool
- func (p *Pool) Close(dopplerAddr string)
- func (p *Pool) ContainerMetrics(dopplerAddr string, ctx context.Context, req *plumbing.ContainerMetricsRequest) (*plumbing.ContainerMetricsResponse, error)
- func (p *Pool) RecentLogs(dopplerAddr string, ctx context.Context, req *plumbing.RecentLogsRequest) (*plumbing.RecentLogsResponse, error)
- func (p *Pool) RegisterDoppler(addr string)
- func (p *Pool) Subscribe(dopplerAddr string, ctx context.Context, req *plumbing.SubscriptionRequest) (plumbing.Doppler_SubscribeClient, error)
- type Receiver
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 ¶
func (c *GRPCConnector) Subscribe(ctx context.Context, req *plumbing.SubscriptionRequest) (Receiver, error)
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 (*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 ¶
Click to show internal directories.
Click to hide internal directories.