etcd

package
v0.0.0-...-fb1bee7 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ServicePrefix = "grpclb"
)

Functions

func InitEtcd

func InitEtcd(c *Config) (func() error, error)

func RegisterService

func RegisterService(ctx context.Context, service string, host string, port int, ttl int64) (func() error, error)

Types

type Config

type Config struct {
	Endpoints []string `json:"endpoints" toml:"endpoints" mapstructure:"endpoints"`

	ConnectTimeout     time.Duration `json:"connect_timeout" toml:"-" mapstructure:"-"`
	StartupRetryTimes  int           `json:"startup_retry_times" toml:"-" mapstructure:"-"`
	StartupRetryPeriod time.Duration `json:"startup_retry_period" toml:"-" mapstructure:"-"`
}

func (*Config) String

func (c *Config) String() string

func (*Config) VerifyConfig

func (c *Config) VerifyConfig() error

Jump to

Keyboard shortcuts

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