store

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IKVStore

type IKVStore interface {
	TestLive() error

	// result will be null if does not exist
	Get(Id string) ([]byte, error)
	Set(Id string, value []byte) error

	Cleanup() error
}

func NewKVConsul

func NewKVConsul(config *KVConsulConfig) (IKVStore, error)

func NewMockKVStore

func NewMockKVStore() IKVStore

type KVConsul

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

func (KVConsul) Cleanup

func (c KVConsul) Cleanup() error

func (KVConsul) Get

func (c KVConsul) Get(Id string) ([]byte, error)

func (KVConsul) Set

func (c KVConsul) Set(Id string, value []byte) error

func (KVConsul) TestLive

func (c KVConsul) TestLive() error

type KVConsulConfig

type KVConsulConfig = api.Config

type MockKVStore

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

func (MockKVStore) Cleanup

func (kv MockKVStore) Cleanup() error

func (MockKVStore) Get

func (kv MockKVStore) Get(Id string) ([]byte, error)

func (MockKVStore) Set

func (kv MockKVStore) Set(Id string, value []byte) error

func (MockKVStore) TestLive

func (kv MockKVStore) TestLive() error

Jump to

Keyboard shortcuts

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