etcdc

package
v0.0.0-...-8210b9c Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host               string
	Key                string
	ID                 int64  `json:",optional"`
	User               string `json:",optional"`
	Pass               string `json:",optional"`
	CertFile           string `json:",optional"`
	CertKeyFile        string `json:",optional=CertFile"`
	CACertFile         string `json:",optional=CertFile"`
	InsecureSkipVerify bool   `json:",optional"`
}

type Etcd

type Etcd[T any] struct {
	// contains filtered or unexported fields
}

func NewEtcd

func NewEtcd[T any](c Config) *Etcd[T]

NewEtcd 实例化etcd

func (*Etcd[T]) GetConfig

func (ctr *Etcd[T]) GetConfig() (T, error)

func (*Etcd[T]) Listener

func (ctr *Etcd[T]) Listener(listener func(ec *Etcd[T]))

Jump to

Keyboard shortcuts

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