app

package
v0.0.0-...-0ad2128 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LogsProviderAddr string `env:"LOGS_PROVIDER_ADDR, required, report"`
	LogsProviderTLS  LogsProviderTLS

	MetricsAddr string `env:"METRICS_ADDR, report"`

	ShardID string `env:"SHARD_ID, report"`
	Drains  Drains `env:"DRAINS,   report"`
}

type Drain

type Drain struct {
	Namespace string `json:"namespace"`
	URL       string `json:"url"`
	All       bool   `json:"all"`
}

type Drains

type Drains []Drain

func (*Drains) UnmarshalEnv

func (d *Drains) UnmarshalEnv(data string) error

type LogsProviderTLS

type LogsProviderTLS struct {
	CA   string `env:"LOGS_PROVIDER_CA_FILE_PATH,   required, report"`
	Cert string `env:"LOGS_PROVIDER_CERT_FILE_PATH, required, report"`
	Key  string `env:"LOGS_PROVIDER_KEY_FILE_PATH,  required, report"`
}

type Nozzle

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

func NewNozzle

func NewNozzle(
	sc StreamConnector,
	drains []Drain,
	shardID string,
	opts ...NozzleOption,
) *Nozzle

func (*Nozzle) Close

func (n *Nozzle) Close() error

func (*Nozzle) Start

func (n *Nozzle) Start() error

type NozzleOption

type NozzleOption func(*Nozzle)

func WithConversionErrorCounter

func WithConversionErrorCounter(c prometheus.Counter) NozzleOption

func WithDroppedCounter

func WithDroppedCounter(c prometheus.Counter) NozzleOption

func WithEgressedCounter

func WithEgressedCounter(c prometheus.Counter) NozzleOption

func WithIgnoredCounter

func WithIgnoredCounter(c prometheus.Counter) NozzleOption

type StreamConnector

type StreamConnector interface {
	Stream(context.Context, *loggregator_v2.EgressBatchRequest) loggregator.EnvelopeStream
}

Jump to

Keyboard shortcuts

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