Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthRegistrar ¶
HealthRegistrar provides an interface to record various counters.
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 Receiver ¶
type Receiver interface {
Subscribe(ctx context.Context, req *loggregator_v2.EgressBatchRequest) (rx func() (*loggregator_v2.Envelope, error), err error)
}
Receiver creates a function which will receive envelopes on a stream.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents a bridge between inbound data from the Receiver and outbound data on a gRPC stream.
func NewServer ¶
func NewServer( r Receiver, m MetricClient, h HealthRegistrar, c context.Context, batchSize int, batchInterval time.Duration, opts ...ServerOption, ) *Server
NewServer is the preferred way to create a new Server.
func (*Server) BatchedReceiver ¶
func (s *Server) BatchedReceiver(r *loggregator_v2.EgressBatchRequest, srv loggregator_v2.Egress_BatchedReceiverServer) error
BatchedReceiver implements the loggregator-api V2 gRPC interface for receiving batches of envelopes. Envelopes will be written to the egress batched receiver server whenever the configured interval or configured batch size is exceeded.
func (*Server) Receiver ¶
func (s *Server) Receiver(r *loggregator_v2.EgressRequest, srv loggregator_v2.Egress_ReceiverServer) error
Receiver implements the loggregator-api V2 gRPC interface for receiving envelopes from upstream connections.
type ServerOption ¶
type ServerOption func(*Server)
ServerOption represents a function that cancel configure an RLP egress server.
func WithMaxStreams ¶
func WithMaxStreams(conn int64) ServerOption
WithMaxStreams specifies the maximum streams allowed by the RLP egress server.