options

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct{}

func (Client) EtcdClientTimeout added in v1.7.0

func (Client) EtcdClientTimeout(timeout time.Duration) func(*config.Client)

EtcdClientTimeout sets the timeout duration for server-side etcd client operations. The default value is 5 seconds.

func (Client) GRPCOptions

func (Client) GRPCOptions(options ...grpc.DialOption) func(*config.Client)

GRPCOptions adds gRPC dial options to the client.

func (Client) MaxActiveServers

func (Client) MaxActiveServers(count int) func(*config.Client)

MaxActiveServers sets the maximum number of active servers the client will connect to. Servers exceeding this limit will not receive requests.

type Platform

type Platform struct{}

func (Platform) ClientOptions

func (Platform) ClientOptions(options ...func(*config.Client)) func(*config.Platform)

ClientOptions sets default options for all new clients. Local client options can override these global settings.

func (Platform) OpenTelemetry

func (Platform) OpenTelemetry(serviceName string, sampleRate float64, exporters ...trace.SpanExporter) func(*config.Platform)

OpenTelemetry configures OpenTelemetry tracing for clients and servers.

func (Platform) ServerOptions

func (Platform) ServerOptions(options ...func(*config.Server)) func(*config.Platform)

ServerOptions sets default options for all new servers. Local server options can override these global settings.

type Server

type Server struct{}

func (Server) Attributes

func (Server) Attributes(attributes *attributes.Attributes) func(*config.Server)

Attributes sets server attributes that are applied by the server and accessible via the Lookup method.

func (Server) EtcdClientTimeout added in v1.7.0

func (Server) EtcdClientTimeout(timeout time.Duration) func(*config.Server)

EtcdClientTimeout sets the timeout duration for server-side etcd client operations. The default value is 5 seconds.

func (Server) EtcdLeaseTimeout added in v1.7.0

func (Server) EtcdLeaseTimeout(timeout time.Duration) func(*config.Server)

EtcdLeaseTimeout sets the Time-To-Live (TTL) duration for the etcd lease. The default value is 5 seconds.

func (Server) GRPCOptions

func (Server) GRPCOptions(options ...grpc.ServerOption) func(*config.Server)

GRPCOptions adds gRPC server options to the server.

func (Server) PublicAddr

func (Server) PublicAddr(publicAddr string) func(*config.Server)

PublicAddr sets the public address for the server when it is not accessible to clients at its listening address.

func (Server) StopTimeout added in v1.7.0

func (Server) StopTimeout(timeout time.Duration) func(*config.Server)

StopTimeout sets the maximum duration the server will wait for a graceful stop. If the timeout is greater than zero, a graceful stop is applied; otherwise, it stops immediately. The default value is 0.

Jump to

Keyboard shortcuts

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