Documentation ¶
Index ¶
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 { plumbing.DopplerServer // 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, metricClient MetricClient, droppedMetric *metricemitter.Counter, subscriptionsMetric *metricemitter.Gauge, batchInterval time.Duration, batchSize uint, bufferSize int, ) *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) Subscribe ¶
func (m *DopplerServer) Subscribe(req *plumbing.SubscriptionRequest, sender plumbing.Doppler_SubscribeServer) error
Subscribe is called by GRPC on stream requests.
type IngestorGRPCServer ¶
type IngestorGRPCServer interface { plumbing.DopplerIngestor_PusherServer }
type IngestorServer ¶
type IngestorServer struct { plumbing.DopplerIngestorServer // contains filtered or unexported fields }
func NewIngestorServer ¶
func NewIngestorServer( v1Buf *diodes.ManyToOneEnvelope, v2Buf *diodes.ManyToOneEnvelopeV2, ingressMetric *metricemitter.Counter, ) *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.