instancestorage

package
v0.22.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPluginTypeConfig

func NewPluginTypeConfig() pluggable.PluginTypeConfig

NewPluginTypeConfig for instance storage.

Types

type ClaimStore

type ClaimStore = claim.Store

A sad hack because claim.Store has a method called Store which prevents us from embedding it as a field

type DynamicCrudStore

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

DynamicCrudStore wraps another backing store that is instantiated just in time before each method call.

func NewDynamicCrudStore

func NewDynamicCrudStore(builder DynamicCrudStoreBuilder) *DynamicCrudStore

func (DynamicCrudStore) Delete

func (s DynamicCrudStore) Delete(name string) error

func (DynamicCrudStore) List

func (s DynamicCrudStore) List() ([]string, error)

func (DynamicCrudStore) Read

func (s DynamicCrudStore) Read(name string) ([]byte, error)

func (DynamicCrudStore) Store

func (s DynamicCrudStore) Store(name string, data []byte) error

type DynamicCrudStoreBuilder

type DynamicCrudStoreBuilder func() (crud.Store, func(), error)

type PluggableInstanceStorage

type PluggableInstanceStorage struct {
	*config.Config
	ClaimStore
}

PluggableInstanceStorage provides access to instance storage (claims) by instantiating plugins that implement claim (CRUD) storage.

func NewPluggableInstanceStorage

func NewPluggableInstanceStorage(c *config.Config) *PluggableInstanceStorage

type StorageProvider

type StorageProvider interface {
	List() ([]string, error)
	Store(claim.Claim) error
	Read(name string) (claim.Claim, error)
	ReadAll() ([]claim.Claim, error)
	Delete(name string) error
}

StorageProvider interface for instance storage (claims).

type TestInstanceStorageProvider

type TestInstanceStorageProvider struct {
	ClaimStore
}

func NewTestInstanceStorageProvider

func NewTestInstanceStorageProvider() TestInstanceStorageProvider

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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