etcdv3

package
v0.0.0-...-fa73266 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package etcdv3 is the etcd wrapper implementation.

Index

Constants

View Source
const (
	ErrCodeKeyNotFound int = iota + 1
	ErrCodeKeyExists
	ErrCodeResourceVersionConflicts
	ErrCodeInvalidObj
	ErrCodeUnreachable
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Create(ctx context.Context, object *model.KVPair) error
	Delete(ctx context.Context, k model.Key) error
}

func New

func New(config *config.Config) (Client, error)

type ErrorDatastoreError

type ErrorDatastoreError struct {
	Err        error
	Identifier interface{}
}

Error indicating a problem connecting to the backend.

func (ErrorDatastoreError) Error

func (e ErrorDatastoreError) Error() string

type EtcdV3Client

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

func (*EtcdV3Client) Create

func (c *EtcdV3Client) Create(ctx context.Context, d *model.KVPair) error

func (*EtcdV3Client) Delete

func (c *EtcdV3Client) Delete(ctx context.Context, k model.Key) error

type StorageError

type StorageError struct {
	Code               int
	Key                string
	ResourceVersion    int64
	AdditionalErrorMsg string
}

func NewKeyExistsError

func NewKeyExistsError(key string, rv int64) *StorageError

func (*StorageError) Error

func (e *StorageError) Error() string

Jump to

Keyboard shortcuts

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