etcd

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEtcdStateStoreV1 added in v1.12.0

func NewEtcdStateStoreV1(logger logger.Logger) state.Store

NewEtcdStateStoreV1 returns a new etcd state store for schema V1.

func NewEtcdStateStoreV2 added in v1.12.0

func NewEtcdStateStoreV2(logger logger.Logger) state.Store

NewEtcdStateStoreV2 returns a new etcd state store for schema V2.

func NewTLSConfig added in v1.11.0

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

Types

type Etcd added in v1.11.0

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

Etcd is a state store implementation for Etcd.

func (*Etcd) Close added in v1.11.0

func (e *Etcd) Close() error

func (*Etcd) Delete added in v1.11.0

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

Delete performes a Etcd KV delete operation.

func (*Etcd) Features added in v1.11.0

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

Features returns the features available in this state store.

func (*Etcd) Get added in v1.11.0

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

Get retrieves a Etcd KV item.

func (*Etcd) GetComponentMetadata added in v1.11.0

func (e *Etcd) GetComponentMetadata() (metadataInfo metadata.MetadataMap)

func (*Etcd) Init added in v1.11.0

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

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

func (*Etcd) Multi added in v1.11.0

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) MultiMaxSize added in v1.12.0

func (e *Etcd) MultiMaxSize() int

MultiMaxSize returns the maximum number of operations allowed in a transaction. For Etcd the default is 128, but this can be configured via the server flag --max-txn-ops. As such we are using the component metadata value maxTxnOps.

func (*Etcd) ParseClientFromConfig added in v1.11.0

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

func (*Etcd) Ping added in v1.11.0

func (e *Etcd) Ping() error

func (*Etcd) Set added in v1.11.0

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