Documentation ¶
Index ¶
- type Config
- type GRPC
- type MetricClient
- type RLP
- type RLPOption
- func WithEgressPort(port int) RLPOption
- func WithEgressServerOptions(opts ...grpc.ServerOption) RLPOption
- func WithHealthAddr(addr string) RLPOption
- func WithIngressAddrs(addrs []string) RLPOption
- func WithIngressDialOptions(opts ...grpc.DialOption) RLPOption
- func WithMaxEgressConnections(max int) RLPOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { PProfPort uint32 `env:"RLP_PPROF_PORT"` HealthAddr string `env:"RLP_HEALTH_ADDR"` MetricEmitterInterval time.Duration `env:"RLP_METRIC_EMITTER_INTERVAL"` RouterAddrs []string `env:"ROUTER_ADDRS, required"` AgentAddr string `env:"AGENT_ADDR"` 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
}
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 remote 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 WithHealthAddr ¶
WithHealthAddr specifies the host and port to bind to for servicing the health endpoint.
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.