Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SpecHandler ¶
type SpecHandler interface { // SpecFromString parses options from the name. // If the scheduler was unable to pass in the volume spec via the API, // the spec can be passed in via the name in the format: // "key=value;key=value;name=volname" // source is populated if key parent=<volume_id> is specified. // If the spec was parsed, it returns: // (true, parsed_spec, locator, source, parsed_name) // If the input string didn't contain the string, it returns: // (false, DefaultSpec(), nil, nil, inputString) SpecFromString(inputString string) ( bool, *api.VolumeSpec, *api.VolumeLocator, *api.Source, string, ) SpecFromOpts(opts map[string]string) ( *api.VolumeSpec, *api.VolumeLocator, *api.Source, error, ) // UpdateSpecFromOpts parses in volume options passed through the opts map and updates given spec, locator & source // If the options are validated then it returns: // (resultant_VolumeSpec, source, locator, nil) // If the options have invalid values then it returns: // (nil, nil, nil, error) UpdateSpecFromOpts(opts map[string]string, spec *api.VolumeSpec, locator *api.VolumeLocator, source *api.Source) ( *api.VolumeSpec, *api.VolumeLocator, *api.Source, error, ) // Returns a default VolumeSpec if no docker options or string encoding // was provided. DefaultSpec() *api.VolumeSpec }
SpecHandler provides conversion function from what gets passed in over the plugin API to an api.VolumeSpec object.
func NewSpecHandler ¶
func NewSpecHandler() SpecHandler
NewSpecHandler returns a new SpecHandler interface
Click to show internal directories.
Click to hide internal directories.