grpcmanager

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batcher

type Batcher interface {
	BatchCounter(name string) metricbatcher.BatchCounterChainer
}

type DataDumper

type DataDumper interface {
	LatestContainerMetrics(appID string) []*events.Envelope
	RecentLogsFor(appID string) []*events.Envelope
}

DataDumper dumps Envelopes for container metrics and recent logs requests.

type DataSetter

type DataSetter interface {
	Set(data []byte)
}

DataSetter accepts writes of marshalled data.

type GRPCManager

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

GRPCManager is the GRPC server component that accepts requests for firehose streams, application streams, container metrics, and recent logs.

func New

func New(registrar Registrar, dumper DataDumper) *GRPCManager

New creates a new GRPCManager.

func (*GRPCManager) Alert

func (m *GRPCManager) Alert(missed int)

Alert logs dropped message counts to stderr.

func (*GRPCManager) ContainerMetrics

ContainerMetrics is called by GRPC on container metrics requests.

func (*GRPCManager) RecentLogs

RecentLogs is called by GRPC on recent logs requests.

func (*GRPCManager) Subscribe

Subscribe is called by GRPC on stream requests.

type IngestorGRPCServer

type IngestorGRPCServer interface {
	plumbing.DopplerIngestor_PusherServer
}

type IngestorManager

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

func NewIngestor

func NewIngestor(sender MessageSender, batcher Batcher) *IngestorManager

func (*IngestorManager) Pusher

type MessageSender

type MessageSender interface {
	Set(*events.Envelope)
}

type Registrar

type Registrar interface {
	Register(req *plumbing.SubscriptionRequest, setter DataSetter) func()
}

Registrar registers stream and firehose DataSetters to accept reads.

type Router

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

func NewRouter

func NewRouter() *Router

func (*Router) Register

func (r *Router) Register(req *plumbing.SubscriptionRequest, dataSetter DataSetter) (cleanup func())

func (*Router) SendTo

func (r *Router) SendTo(appID string, envelope *events.Envelope)

Jump to

Keyboard shortcuts

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