Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Pool configuration attribute names. Name = "name" Type = "type" )
View Source
const RootFsLoopPoolName = "loop"
Variables ¶
View Source
var ( MissingTypeError = errors.New("provider type is missing") MissingNameError = errors.New("pool name is missing") )
Functions ¶
func RegisterDefaultPools ¶
func RegisterDefaultPools(pm PoolManager, agentConfig agent.Config) error
RegisterDefaultPools ensures that the required out of the box storage pools are registered.
func RegisterPool ¶
func RegisterPool(pm PoolManager, name string, providerType storage.ProviderType, replace bool, cfg map[string]interface{}) error
RegisterPool creates a named pool for the provider type with the specified config.
Types ¶
type Pool ¶
type Pool interface {
// Name is the pool's name.
Name() string
// Type is the type of storage provider this pool represents, eg "loop", "ebs.
Type() storage.ProviderType
// Config is the pool's configuration attributes.
Config() map[string]interface{}
}
A Pool is a storage provider with configuration.
type PoolManager ¶
type PoolManager interface {
// Create makes a new pool with the specified configuration and persists it to state.
Create(name string, providerType storage.ProviderType, attrs map[string]interface{}) (Pool, error)
// Delete removes the pool with name from state.
Delete(name string) error
// Get returns the pool with name from state.
Get(name string) (Pool, error)
// List returns all the pools from state.
List() ([]Pool, error)
}
A PoolManager provides access to storage pools.
func NewPoolManager ¶
func NewPoolManager(settings SettingsManager) PoolManager
NewPoolManager returns a NewPoolManager implementation using the specified state.
Click to show internal directories.
Click to hide internal directories.