drivers

package
v0.0.0-...-b28b487 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store is an in-memory store for volume drivers

func NewStore

func NewStore(pg getter.PluginGetter) *Store

NewStore creates a new volume driver store

func (*Store) CreateDriver

func (s *Store) CreateDriver(name string) (volume.Driver, error)

CreateDriver returns a volume driver by its name and increments RefCount. If the driver is empty, it looks for the local driver.

func (*Store) GetAllDrivers

func (s *Store) GetAllDrivers() ([]volume.Driver, error)

GetAllDrivers lists all the registered drivers

func (*Store) GetDriver

func (s *Store) GetDriver(name string) (volume.Driver, error)

GetDriver returns a volume driver by its name. If the driver is empty, it looks for the local driver.

func (*Store) GetDriverList

func (s *Store) GetDriverList() []string

GetDriverList returns list of volume drivers registered. If no driver is registered, empty string list will be returned.

func (*Store) Register

func (s *Store) Register(d volume.Driver, name string) bool

Register associates the given driver to the given name, checking if the name is already associated

func (*Store) ReleaseDriver

func (s *Store) ReleaseDriver(name string) (volume.Driver, error)

ReleaseDriver returns a volume driver by its name and decrements RefCount.. If the driver is empty, it looks for the local driver.

Jump to

Keyboard shortcuts

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