loadbalancing

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package loadbalancing provides an otelcol.exporter.loadbalancing component.

Index

Constants

View Source
const (
	HealthStatusFilterHealthy          string = "HEALTHY"
	HealthStatusFilterUnhealthy        string = "UNHEALTHY"
	HealthStatusFilterAll              string = "ALL"
	HealthStatusFilterHealthyOrElseAll string = "HEALTHY_OR_ELSE_ALL"
)

Possible values for "health_status"

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSCloudMapResolver added in v1.1.0

type AWSCloudMapResolver struct {
	NamespaceName string        `alloy:"namespace,attr"`
	ServiceName   string        `alloy:"service_name,attr"`
	HealthStatus  string        `alloy:"health_status,attr,optional"`
	Interval      time.Duration `alloy:"interval,attr,optional"`
	Timeout       time.Duration `alloy:"timeout,attr,optional"`
	Port          *uint16       `alloy:"port,attr,optional"`
}

AWSCloudMapResolver allows users to use this exporter when using ECS over EKS in an AWS infrastructure.

func (*AWSCloudMapResolver) Convert added in v1.1.0

func (*AWSCloudMapResolver) SetToDefault added in v1.1.0

func (r *AWSCloudMapResolver) SetToDefault()

SetToDefault implements syntax.Defaulter.

func (*AWSCloudMapResolver) Validate added in v1.1.0

func (r *AWSCloudMapResolver) Validate() error

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 otelcolCfg.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() otelcolCfg.DebugMetricsArguments

DebugMetricsConfig implements exporter.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) SetToDefault

func (r *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"`
	Timeout time.Duration `alloy:"timeout,attr,optional"`
}

KubernetesResolver defines the configuration for the k8s resolver

func (*KubernetesResolver) Convert

func (*KubernetesResolver) SetToDefault

func (r *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"`
	AWSCloudMap *AWSCloudMapResolver `alloy:"aws_cloud_map,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

Jump to

Keyboard shortcuts

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