etcd

package
v0.0.0-...-ebb33e4 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEtcdStateStore

func NewEtcdStateStore(logger logger.Logger) state.Store

NewEtcdStateStore returns a new etcd state store.

func NewTLSConfig

func NewTLSConfig(clientCert, clientKey, caCert string) (*tls.Config, error)

Types

type Etcd

type Etcd struct {
	state.BulkStore
	// contains filtered or unexported fields
}

Etcd is a state store implementation for Etcd.

func (*Etcd) Close

func (e *Etcd) Close() error

func (*Etcd) Delete

func (e *Etcd) Delete(ctx context.Context, req *state.DeleteRequest) error

Delete performes a Etcd KV delete operation.

func (*Etcd) Features

func (e *Etcd) Features() []state.Feature

Features returns the features available in this state store.

func (*Etcd) Get

func (e *Etcd) Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error)

Get retrieves a Etcd KV item.

func (*Etcd) GetComponentMetadata

func (e *Etcd) GetComponentMetadata() map[string]string

func (*Etcd) Init

func (e *Etcd) Init(_ context.Context, metadata state.Metadata) error

Init does metadata and config parsing and initializes the Etcd client.

func (*Etcd) Multi

func (e *Etcd) Multi(ctx context.Context, request *state.TransactionalStateRequest) error

Multi performs a transactional operation. succeeds only if all operations succeed, and fails if one or more operations fail.

func (*Etcd) ParseClientFromConfig

func (e *Etcd) ParseClientFromConfig(etcdConfig *etcdConfig) (*clientv3.Client, error)

func (*Etcd) Ping

func (e *Etcd) Ping() error

func (*Etcd) Set

func (e *Etcd) Set(ctx context.Context, req *state.SetRequest) error

Set saves a Etcd KV item.

Jump to

Keyboard shortcuts

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