Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Pool configuration attribute names. Name = "name" Type = "type" )
Variables ¶
View Source
var ( MissingTypeError = errors.New("provider type is missing") MissingNameError = errors.New("pool name is missing") )
Functions ¶
func AddDefaultStoragePools ¶
func AddDefaultStoragePools(settings SettingsManager) error
AddDefaultStoragePools is run at bootstrap and on upgrade to ensure that out of the box storage pools are created.
func RegisterDefaultStoragePools ¶
RegisterDefaultStoragePools registers pool information to be saved to state when AddDefaultStoragePools is called.
Types ¶
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{}) (*storage.Config, error) // Delete removes the pool with name from state. Delete(name string) error // Get returns the pool with name from state. Get(name string) (*storage.Config, error) // List returns all the pools from state. List() ([]*storage.Config, error) }
A PoolManager provides access to storage pools.
func New ¶
func New(settings SettingsManager) PoolManager
New returns a PoolManager implementation using the specified state.
Click to show internal directories.
Click to hide internal directories.