Documentation
¶
Index ¶
- type Config
- type GRPC
- type MetricClient
- type RLP
- type RLPOption
- func WithEgressPort(port int) RLPOption
- func WithEgressServerOptions(opts ...grpc.ServerOption) RLPOption
- func WithIngressAddrs(addrs []string) RLPOption
- func WithIngressDialOptions(opts ...grpc.DialOption) RLPOption
- func WithMaxEgressConnections(max int) RLPOption
- func WithMaxEgressStreams(max int64) RLPOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
UseRFC339 bool `env:"USE_RFC339"`
PProfPort uint32 `env:"RLP_PPROF_PORT"`
MetricEmitterInterval time.Duration `env:"RLP_METRIC_EMITTER_INTERVAL"`
MetricSourceID string `env:"RLP_METRIC_SOURCE_ID"`
RouterAddrs []string `env:"ROUTER_ADDRS, required"`
AgentAddr string `env:"AGENT_ADDR"`
MaxEgressStreams int64 `env:"MAX_EGRESS_STREAMS"`
GRPC GRPC
}
Config stores all configurations options for RLP.
func LoadConfig ¶
LoadConfig reads from the environment to create a Config.
type GRPC ¶
type GRPC struct {
Port int `env:"RLP_PORT"`
CertFile string `env:"RLP_CERT_FILE"`
KeyFile string `env:"RLP_KEY_FILE"`
CAFile string `env:"RLP_CA_FILE"`
CipherSuites []string `env:"RLP_CIPHER_SUITES"`
}
GRPC stores the configuration for the RLP as a server using a PORT with mTLS certs and as a client also using mTSL certs for emitting metrics and for connecting to the Router.
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 RLP ¶
type RLP struct {
// contains filtered or unexported fields
}
RLP represents the reverse log proxy component. It connects to various gRPC servers to ingress data and opens a gRPC server to egress data.
func NewRLP ¶
func NewRLP(m MetricClient, opts ...RLPOption) *RLP
NewRLP returns a new unstarted RLP.
func (*RLP) EgressAddr ¶
EgressAddr returns the address used for the egress server.
type RLPOption ¶
type RLPOption func(c *RLP)
RLPOption represents a function that can configure a reverse log proxy.
func WithEgressPort ¶
WithEgressPort specifies the port used to bind the egress gRPC server.
func WithEgressServerOptions ¶
func WithEgressServerOptions(opts ...grpc.ServerOption) RLPOption
WithEgressServerOptions specifies the dial options used when serving data via gRPC.
func WithIngressAddrs ¶
WithIngressAddrs specifies the addresses used to connect to ingress data.
func WithIngressDialOptions ¶
func WithIngressDialOptions(opts ...grpc.DialOption) RLPOption
WithIngressDialOptions specifies the dial options used when connecting to the gRPC server to ingress data.
func WithMaxEgressConnections ¶
WithMaxEgressConnections specifies the number of connections the RLP will accept on the egress endpoint.
func WithMaxEgressStreams ¶
WithMaxEgressStreams specifies the number of streams the RLP will allow.