Documentation
¶
Overview ¶
Package loadbalancing provides an otelcol.exporter.loadbalancing component.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultArguments = Arguments{
RoutingKey: "traceID",
}
DefaultArguments holds default values for Arguments.
var DefaultDNSResolver = DNSResolver{ Port: "4317", Interval: 5 * time.Second, Timeout: 1 * time.Second, }
DefaultDNSResolver holds default values for DNSResolver.
var DefaultGRPCClientArguments = GRPCClientArguments{ Headers: map[string]string{}, Compression: otelcol.CompressionTypeGzip, WriteBufferSize: 512 * 1024, }
DefaultGRPCClientArguments holds component-specific default settings for GRPCClientArguments.
Functions ¶
This section is empty.
Types ¶
type Arguments ¶
type Arguments struct { Protocol Protocol `river:"protocol,block"` Resolver ResolverSettings `river:"resolver,block"` RoutingKey string `river:"routing_key,attr,optional"` }
Arguments configures the otelcol.exporter.loadbalancing component.
func (Arguments) Convert ¶
func (args Arguments) Convert() (otelcomponent.Config, error)
Convert implements exporter.Arguments.
func (Arguments) Exporters ¶
func (args Arguments) Exporters() map[otelcomponent.DataType]map[otelcomponent.ID]otelcomponent.Component
Exporters implements exporter.Arguments.
func (Arguments) Extensions ¶
func (args Arguments) Extensions() map[otelcomponent.ID]otelextension.Extension
Extensions implements exporter.Arguments.
func (*Arguments) SetToDefault ¶
func (args *Arguments) SetToDefault()
SetToDefault implements river.Defaulter.
type DNSResolver ¶
type DNSResolver struct { Hostname string `river:"hostname,attr"` Port string `river:"port,attr,optional"` Interval time.Duration `river:"interval,attr,optional"` Timeout time.Duration `river:"timeout,attr,optional"` }
DNSResolver defines the configuration for the DNS resolver
func (*DNSResolver) Convert ¶
func (dnsResolver *DNSResolver) Convert() loadbalancingexporter.DNSResolver
func (*DNSResolver) SetToDefault ¶
func (args *DNSResolver) SetToDefault()
SetToDefault implements river.Defaulter.
type GRPCClientArguments ¶
type GRPCClientArguments struct { Compression otelcol.CompressionType `river:"compression,attr,optional"` TLS otelcol.TLSClientArguments `river:"tls,block,optional"` Keepalive *otelcol.KeepaliveClientArguments `river:"keepalive,block,optional"` ReadBufferSize units.Base2Bytes `river:"read_buffer_size,attr,optional"` WriteBufferSize units.Base2Bytes `river:"write_buffer_size,attr,optional"` WaitForReady bool `river:"wait_for_ready,attr,optional"` Headers map[string]string `river:"headers,attr,optional"` BalancerName string `river:"balancer_name,attr,optional"` // Auth is a binding to an otelcol.auth.* component extension which handles // authentication. Auth *auth.Handler `river:"auth,attr,optional"` }
GRPCClientArguments is the same as otelcol.GRPCClientArguments, but without an "endpoint" attribute
func (*GRPCClientArguments) Convert ¶
func (args *GRPCClientArguments) Convert() *otelconfiggrpc.GRPCClientSettings
Convert converts args into the upstream type.
func (*GRPCClientArguments) Extensions ¶
func (args *GRPCClientArguments) Extensions() map[otelcomponent.ID]otelextension.Extension
Extensions exposes extensions used by args.
func (*GRPCClientArguments) SetToDefault ¶
func (args *GRPCClientArguments) SetToDefault()
SetToDefault implements river.Defaulter.
type OtlpConfig ¶
type OtlpConfig struct { Timeout time.Duration `river:"timeout,attr,optional"` Queue otelcol.QueueArguments `river:"queue,block,optional"` Retry otelcol.RetryArguments `river:"retry,block,optional"` // Most of the time, the user will not have to set anything in the client block. // However, the block should not be "optional" so that the defaults are populated. Client GRPCClientArguments `river:"client,block"` }
OtlpConfig defines the config for an OTLP exporter
func (OtlpConfig) Convert ¶
func (otlpConfig OtlpConfig) Convert() otlpexporter.Config
type Protocol ¶
type Protocol struct {
OTLP OtlpConfig `river:"otlp,block"`
}
Protocol holds the individual protocol-specific settings. Only OTLP is supported at the moment.
func (Protocol) Convert ¶
func (protocol Protocol) Convert() loadbalancingexporter.Protocol
type ResolverSettings ¶
type ResolverSettings struct { Static *StaticResolver `river:"static,block,optional"` DNS *DNSResolver `river:"dns,block,optional"` }
ResolverSettings defines the configurations for the backend resolver
func (ResolverSettings) Convert ¶
func (resolverSettings ResolverSettings) Convert() loadbalancingexporter.ResolverSettings
type StaticResolver ¶
type StaticResolver struct {
Hostnames []string `river:"hostnames,attr"`
}
StaticResolver defines the configuration for the resolver providing a fixed list of backends
func (StaticResolver) Convert ¶
func (staticResolver StaticResolver) Convert() loadbalancingexporter.StaticResolver