embedded

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

View Source
const DefaultDataDir = "data"

Variables

This section is empty.

Functions

func NewEmbeddedEtcd

func NewEmbeddedEtcd(cfg etcdadpt.Config) etcdadpt.Client

Types

type EtcdEmbed

type EtcdEmbed struct {
	Cfg   etcdadpt.Config
	Embed *embed.Etcd
	// contains filtered or unexported fields
}

func (*EtcdEmbed) Close

func (s *EtcdEmbed) Close()

func (*EtcdEmbed) Compact

func (s *EtcdEmbed) Compact(ctx context.Context, reserve int64) error

func (*EtcdEmbed) Do

func (s *EtcdEmbed) Do(ctx context.Context, opts ...etcdadpt.OpOption) (*etcdadpt.Response, error)

func (*EtcdEmbed) Err

func (s *EtcdEmbed) Err() <-chan error

func (*EtcdEmbed) LeaseGrant

func (s *EtcdEmbed) LeaseGrant(ctx context.Context, TTL int64) (int64, error)

func (*EtcdEmbed) LeaseRenew

func (s *EtcdEmbed) LeaseRenew(ctx context.Context, leaseID int64) (int64, error)

func (*EtcdEmbed) LeaseRevoke

func (s *EtcdEmbed) LeaseRevoke(ctx context.Context, leaseID int64) error

func (*EtcdEmbed) ListCluster

func (s *EtcdEmbed) ListCluster(ctx context.Context) (etcdadpt.Clusters, error)

func (*EtcdEmbed) Ready

func (s *EtcdEmbed) Ready() <-chan struct{}

func (*EtcdEmbed) Status added in v0.5.0

func (*EtcdEmbed) Txn

TODO EMBED支持KV().TxnBegin()->TxnID,可惜PROXY模式暂时不支持

func (*EtcdEmbed) TxnWithCmp

func (s *EtcdEmbed) TxnWithCmp(ctx context.Context, success []etcdadpt.OpOptions, cmps []etcdadpt.CmpOptions, fail []etcdadpt.OpOptions) (*etcdadpt.Response, error)

func (*EtcdEmbed) Watch

func (s *EtcdEmbed) Watch(ctx context.Context, opts ...etcdadpt.OpOption) (err error)

func (*EtcdEmbed) WithTimeout

func (s *EtcdEmbed) WithTimeout(ctx context.Context) (context.Context, context.CancelFunc)

Jump to

Keyboard shortcuts

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