storage

package
v2.0.0-beta.10+incompa... Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2018 License: Apache-2.0 Imports: 4 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ETCDRepository

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

func (*ETCDRepository) Delete

func (e *ETCDRepository) Delete(ctx context.Context, prefix string, key string) error

func (*ETCDRepository) Get

func (e *ETCDRepository) Get(ctx context.Context, prefix string, key string) ([]byte, error)

func (*ETCDRepository) GetAll

func (e *ETCDRepository) GetAll(ctx context.Context, prefix string) ([][]byte, error)

func (*ETCDRepository) GetClient

func (e *ETCDRepository) GetClient() (*clientv3.Client, error)

func (*ETCDRepository) Put

func (e *ETCDRepository) Put(ctx context.Context, prefix string, key string, value []byte) error

type Interface

type Interface interface {
	GetAll(ctx context.Context, prefix string) ([][]byte, error)
	Get(ctx context.Context, prefix string, key string) ([]byte, error)
	Put(ctx context.Context, prefix string, key string, value []byte) error
	Delete(ctx context.Context, prefix string, key string) error
}

Interface is an abstraction over key value storage, gets and returns values serialized as byte slices It is up to the services to do data conversion from

func NewETCDRepository

func NewETCDRepository(cfg clientv3.Config) Interface

Jump to

Keyboard shortcuts

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