loadbalancing

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package loadbalancing provides an otelcol.exporter.loadbalancing component.

Index

Constants

This section is empty.

Variables

View Source
var DefaultDNSResolver = DNSResolver{
	Port:     "4317",
	Interval: 5 * time.Second,
	Timeout:  1 * time.Second,
}

DefaultDNSResolver holds default values for DNSResolver.

Functions

This section is empty.

Types

type Arguments

type Arguments struct {
	Protocol   Protocol         `alloy:"protocol,block"`
	Resolver   ResolverSettings `alloy:"resolver,block"`
	RoutingKey string           `alloy:"routing_key,attr,optional"`

	// DebugMetrics configures component internal metrics. Optional.
	DebugMetrics otelcol.DebugMetricsArguments `alloy:"debug_metrics,block,optional"`
}

Arguments configures the otelcol.exporter.loadbalancing component.

func (Arguments) Convert

func (args Arguments) Convert() (otelcomponent.Config, error)

Convert implements exporter.Arguments.

func (Arguments) DebugMetricsConfig

func (args Arguments) DebugMetricsConfig() otelcol.DebugMetricsArguments

DebugMetricsConfig implements receiver.Arguments.

func (Arguments) Exporters

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 syntax.Defaulter.

func (*Arguments) Validate

func (args *Arguments) Validate() error

Validate implements syntax.Validator.

type DNSResolver

type DNSResolver struct {
	Hostname string        `alloy:"hostname,attr"`
	Port     string        `alloy:"port,attr,optional"`
	Interval time.Duration `alloy:"interval,attr,optional"`
	Timeout  time.Duration `alloy:"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 syntax.Defaulter.

type GRPCClientArguments

type GRPCClientArguments struct {
	Compression otelcol.CompressionType `alloy:"compression,attr,optional"`

	TLS       otelcol.TLSClientArguments        `alloy:"tls,block,optional"`
	Keepalive *otelcol.KeepaliveClientArguments `alloy:"keepalive,block,optional"`

	ReadBufferSize  units.Base2Bytes  `alloy:"read_buffer_size,attr,optional"`
	WriteBufferSize units.Base2Bytes  `alloy:"write_buffer_size,attr,optional"`
	WaitForReady    bool              `alloy:"wait_for_ready,attr,optional"`
	Headers         map[string]string `alloy:"headers,attr,optional"`
	BalancerName    string            `alloy:"balancer_name,attr,optional"`
	Authority       string            `alloy:"authority,attr,optional"`

	// Auth is a binding to an otelcol.auth.* component extension which handles
	// authentication.
	Auth *auth.Handler `alloy:"auth,attr,optional"`
}

GRPCClientArguments is the same as otelcol.GRPCClientArguments, but without an "endpoint" attribute

func (*GRPCClientArguments) Convert

Convert converts args into the upstream type.

func (*GRPCClientArguments) Extensions

Extensions exposes extensions used by args.

func (*GRPCClientArguments) SetToDefault

func (args *GRPCClientArguments) SetToDefault()

SetToDefault implements syntax.Defaulter.

type KubernetesResolver

type KubernetesResolver struct {
	Service string  `alloy:"service,attr"`
	Ports   []int32 `alloy:"ports,attr,optional"`
}

KubernetesResolver defines the configuration for the k8s resolver

func (*KubernetesResolver) Convert

func (k8sSvcResolver *KubernetesResolver) Convert() loadbalancingexporter.K8sSvcResolver

func (*KubernetesResolver) SetToDefault

func (args *KubernetesResolver) SetToDefault()

SetToDefault implements syntax.Defaulter.

type OtlpConfig

type OtlpConfig struct {
	Timeout time.Duration          `alloy:"timeout,attr,optional"`
	Queue   otelcol.QueueArguments `alloy:"queue,block,optional"`
	Retry   otelcol.RetryArguments `alloy:"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 `alloy:"client,block"`
}

OtlpConfig defines the config for an OTLP exporter

func (OtlpConfig) Convert

func (oc OtlpConfig) Convert() otlpexporter.Config

func (*OtlpConfig) SetToDefault

func (oc *OtlpConfig) SetToDefault()

type Protocol

type Protocol struct {
	OTLP OtlpConfig `alloy:"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     `alloy:"static,block,optional"`
	DNS        *DNSResolver        `alloy:"dns,block,optional"`
	Kubernetes *KubernetesResolver `alloy:"kubernetes,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 `alloy:"hostnames,attr"`
}

StaticResolver defines the configuration for the resolver providing a fixed list of backends

func (StaticResolver) Convert

func (staticResolver StaticResolver) Convert() loadbalancingexporter.StaticResolver

Jump to

Keyboard shortcuts

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