Documentation ¶
Index ¶
- type DataSetter
- type DopplerServer
- func (m *DopplerServer) Alert(missed int)
- func (m *DopplerServer) BatchSubscribe(req *plumbing.SubscriptionRequest, ...) error
- func (m *DopplerServer) ContainerMetrics(ctx context.Context, req *plumbing.ContainerMetricsRequest) (*plumbing.ContainerMetricsResponse, error)
- func (m *DopplerServer) RecentLogs(ctx context.Context, req *plumbing.RecentLogsRequest) (*plumbing.RecentLogsResponse, error)
- func (m *DopplerServer) Subscribe(req *plumbing.SubscriptionRequest, sender plumbing.Doppler_SubscribeServer) error
- type EnvelopeStore
- type HealthRegistrar
- type IngestorGRPCServer
- type IngestorServer
- type MetricClient
- type Registrar
- type Router
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataSetter ¶
type DataSetter interface {
Set(data []byte)
}
DataSetter accepts writes of marshalled data.
type DopplerServer ¶
type DopplerServer struct {
// contains filtered or unexported fields
}
DopplerServer is the GRPC server component that accepts requests for firehose streams, application streams, and recent logs.
func NewDopplerServer ¶
func NewDopplerServer( registrar Registrar, envelopeStore EnvelopeStore, metricClient MetricClient, droppedMetric *metricemitter.Counter, subscriptionsMetric *metricemitter.Gauge, health HealthRegistrar, batchInterval time.Duration, batchSize uint, ) *DopplerServer
NewDopplerServer creates a new DopplerServer.
func (*DopplerServer) Alert ¶
func (m *DopplerServer) Alert(missed int)
Alert logs dropped message counts to stderr.
func (*DopplerServer) BatchSubscribe ¶
func (m *DopplerServer) BatchSubscribe(req *plumbing.SubscriptionRequest, sender plumbing.Doppler_BatchSubscribeServer) error
BatchSubscribe is called by GRPC on stream batch requests.
func (*DopplerServer) ContainerMetrics ¶
func (m *DopplerServer) ContainerMetrics(ctx context.Context, req *plumbing.ContainerMetricsRequest) (*plumbing.ContainerMetricsResponse, error)
TODO: Deprecated
func (*DopplerServer) RecentLogs ¶
func (m *DopplerServer) RecentLogs(ctx context.Context, req *plumbing.RecentLogsRequest) (*plumbing.RecentLogsResponse, error)
RecentLogs is called by GRPC on recent logs requests.
func (*DopplerServer) Subscribe ¶
func (m *DopplerServer) Subscribe(req *plumbing.SubscriptionRequest, sender plumbing.Doppler_SubscribeServer) error
Subscribe is called by GRPC on stream requests.
type EnvelopeStore ¶
EnvelopeStore returns Envelopes recent logs requests.
type HealthRegistrar ¶
type IngestorGRPCServer ¶
type IngestorGRPCServer interface { plumbing.DopplerIngestor_PusherServer }
type IngestorServer ¶
type IngestorServer struct {
// contains filtered or unexported fields
}
func NewIngestorServer ¶
func NewIngestorServer( v1Buf *diodes.ManyToOneEnvelope, v2Buf *diodes.ManyToOneEnvelopeV2, ingressMetric *metricemitter.Counter, health HealthRegistrar, ) *IngestorServer
func (*IngestorServer) Pusher ¶
func (i *IngestorServer) Pusher(pusher plumbing.DopplerIngestor_PusherServer) error
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 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
}
Router routes envelopes to particular buffers (called DataSetter here). In effect, the Router implements pub-sub. After a buffer has been registered with the Register method, calls to SendTo will ensure a particular envelope is sent to all registered buffers.
func (*Router) Register ¶
func (r *Router) Register(req *plumbing.SubscriptionRequest, dataSetter DataSetter) (cleanup func())
Register stores a request with its corresponding DataSetter. Callers should invoke the cleanup function once a registered request should no longer receive envelopes.