inmem

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2017 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() backend.Backend

New creates a new backend for Inmem remote state.

func Reset added in v0.10.1

func Reset()

Reset clears out all existing state and lock data. This is used to initialize the package during init, as well as between tests.

Types

type Backend added in v0.10.1

type Backend struct {
	*schema.Backend
}

func (*Backend) DeleteState added in v0.10.1

func (b *Backend) DeleteState(name string) error

func (*Backend) State added in v0.10.1

func (b *Backend) State(name string) (state.State, error)

func (*Backend) States added in v0.10.1

func (b *Backend) States() ([]string, error)

type RemoteClient

type RemoteClient struct {
	Data []byte
	MD5  []byte
	Name string
}

RemoteClient is a remote client that stores data in memory for testing.

func (*RemoteClient) Delete

func (c *RemoteClient) Delete() error

func (*RemoteClient) Get

func (c *RemoteClient) Get() (*remote.Payload, error)

func (*RemoteClient) Lock

func (c *RemoteClient) Lock(info *state.LockInfo) (string, error)

func (*RemoteClient) Put

func (c *RemoteClient) Put(data []byte) error

func (*RemoteClient) Unlock

func (c *RemoteClient) Unlock(id string) error

Jump to

Keyboard shortcuts

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