etcd

package
v0.0.0-...-61e4c6b Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const TIMEOUT = 1000 * time.Millisecond

Variables

This section is empty.

Functions

This section is empty.

Types

type Etcd

type Etcd struct {
	// contains filtered or unexported fields
}

func Service

func Service() *Etcd

func (*Etcd) Delete

func (e *Etcd) Delete(ctx context.Context, keyPath string) error

func (*Etcd) Get

func (e *Etcd) Get(ctx context.Context, keyPath string) (string, error)

func (*Etcd) GetBytes

func (e *Etcd) GetBytes(ctx context.Context, keyPath string) ([]byte, error)

func (*Etcd) GetClient

func (e *Etcd) GetClient() *client3.Client

func (*Etcd) GetList

func (e *Etcd) GetList(ctx context.Context, keyPath string) ([]*Item, error)

func (*Etcd) Put

func (e *Etcd) Put(ctx context.Context, keyPath, value string) error

type Item

type Item struct {
	Path  string `json:"path"`
	Value string `json:"value"`
}

Jump to

Keyboard shortcuts

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