package etcd

import "github.com/sagikazarmark/crypt/backend/etcd"

Index

Variables

var CliTimeoutKey = "ETCDV3_CLI_TIMEOUT_SECOND"

Types

type Client

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

func New

func New(machines []string) (*Client, error)

func (*Client) Get

func (c *Client) Get(key string) ([]byte, error)

func (*Client) GetWithContext

func (c *Client) GetWithContext(ctx context.Context, key string) ([]byte, error)

func (*Client) List

func (c *Client) List(key string) (backend.KVPairs, error)

func (*Client) ListWithContext

func (c *Client) ListWithContext(ctx context.Context, key string) (backend.KVPairs, error)

func (*Client) Set

func (c *Client) Set(key string, value []byte) error

func (*Client) SetWithContext

func (c *Client) SetWithContext(ctx context.Context, key string, value []byte) error

func (*Client) Watch

func (c *Client) Watch(key string, stop chan bool) <-chan *backend.Response

func (*Client) WatchWithContext

func (c *Client) WatchWithContext(ctx context.Context, key string, stop chan bool) <-chan *backend.Response

type ClientV3

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

func NewV3

func NewV3(machines []string) (*ClientV3, error)

func (*ClientV3) Get

func (c *ClientV3) Get(key string) ([]byte, error)

func (*ClientV3) List

func (c *ClientV3) List(key string) (backend.KVPairs, error)

func (*ClientV3) Set

func (c *ClientV3) Set(key string, value []byte) error

func (*ClientV3) Watch

func (c *ClientV3) Watch(key string, stop chan bool) <-chan *backend.Response

Source Files

etcd.go etcdv3.go

Version
v0.9.0
Published
Jan 13, 2023
Platform
linux/amd64
Imports
14 packages
Last checked
1 hour ago

Tools for package owners.