Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFileNotFound      = errors.New("File was not found.")
	ErrConnectionRefused = errors.New("Unable to connect to etcd.")
	ErrOperationFailed   = errors.New("Operation failed.")

	DefaultTimeout = 5 * time.Second
)

Functions

This section is empty.

Types

type Client

type Client struct {
	C tofu.VolumeStoreClient
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *Client

type Volume

type Volume struct {
	*clientv3.Client
}

func New

func New() *Volume

func (*Volume) GetFile

func (v *Volume) GetFile(ctx context.Context, file *tofu.File) (*tofu.FileInfo, error)

func (*Volume) ListFiles

func (v *Volume) ListFiles(emptyValue *tofu.EmptyValue, stream tofu.VolumeStore_ListFilesServer) error

func (*Volume) PutFile

func (v *Volume) PutFile(ctx context.Context, file *tofu.FileInfo) (*tofu.FileInfo, error)

func (*Volume) Run

func (v *Volume) Run()