storage

package
v0.0.0-...-aa5afe6 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryPool

type InMemoryPool struct {
	cache.ThreadSafeStore
}

InMemoryPool is used as a cache for cluster resource pools.

func NewInMemoryPool

func NewInMemoryPool() *InMemoryPool

NewInMemoryPool creates an InMemoryPool.

func (*InMemoryPool) Snapshot

func (p *InMemoryPool) Snapshot() map[string]interface{}

Snapshot returns a read only copy of the k:v pairs in the store. Caller beware: Violates traditional snapshot guarantees.

type Snapshotter

type Snapshotter interface {
	Snapshot() map[string]interface{}
	cache.ThreadSafeStore
}

Snapshotter is an interface capable of providing a consistent snapshot of the underlying storage implementation of a pool. It does not guarantee thread safety of snapshots, so they should be treated as read only unless the implementation specifies otherwise.

Jump to

Keyboard shortcuts

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