Documentation

Index

Constants

View Source
const (
	BATCH_FLUSH_INTERVAL = 500 * time.Millisecond
	BATCH_CHANNEL_SIZE   = 512
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Nozzle

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

    Nozzle reads envelopes and writes them to LogCache.

    func NewNozzle

    func NewNozzle(c StreamConnector, logCacheAddr string, shardId string, opts ...NozzleOption) *Nozzle

      NewNozzle creates a new Nozzle.

      func (*Nozzle) Start

      func (n *Nozzle) Start()

        Start starts reading envelopes from the logs provider and writes them to LogCache. It blocks indefinitely.

        type NozzleOption

        type NozzleOption func(*Nozzle)

          NozzleOption configures a Nozzle.

          func WithDialOpts

          func WithDialOpts(opts ...grpc.DialOption) NozzleOption

            WithDialOpts returns a NozzleOption that configures the dial options for dialing the LogCache. It defaults to grpc.WithInsecure().

            func WithLogger

            func WithLogger(l *log.Logger) NozzleOption

              WithLogger returns a NozzleOption that configures a nozzle's logger. It defaults to silent logging.

              func WithMetrics

              func WithMetrics(metrics metrics.Initializer) NozzleOption

                WithMetrics returns a NozzleOption that configures the metrics for the Nozzle. It will add metrics to the given map.

                func WithSelectors

                func WithSelectors(selectors ...string) NozzleOption

                type StreamConnector

                type StreamConnector interface {
                	// Stream creates a EnvelopeStream for the given request.
                	Stream(ctx context.Context, req *loggregator_v2.EgressBatchRequest) loggregator.EnvelopeStream
                }

                  StreamConnector reads envelopes from the the logs provider.

                  Source Files