Documentation ¶
Index ¶
Constants ¶
const ( CredentialFileEnv = "CRED_FILE_PATH" CredentialDefaultLocation = "/etc/kubernetes/cloud.json" SecretDefaultLocation = "/var/run/secrets/pharmer/flexvolmues" RetryInterval = 5 * time.Second RetryTimeout = 10 * time.Minute )
Variables ¶
var ErrIncorrectArgNumber = errors.New("Incorrect number of args")
var ErrNotSupported = errors.New("Not Supported")
var ExecCommand = exec.Command
var UnixStat = unix.Stat
Functions ¶
func CloudManagers ¶
func CloudManagers() []string
CloudManagers returns the name of all registered cloud providers in a string slice
func IsCloudManager ¶
IsCloudManager returns true if name corresponds to an already registered cloud provider.
func RegisterCloudManager ¶
RegisterCloudManager registers a cloud.Factory by name. This is expected to happen during app startup.
Types ¶
type DefaultOptions ¶
type DefaultOptions struct { ApiKey string `json:"kubernetes.io/secret/apiKey"` FsType string `json:"kubernetes.io/fsType"` PVorVolumeName string `json:"kubernetes.io/pvOrVolumeName"` RW string `json:"kubernetes.io/readwrite"` VolumeName string `json:"volumeName,omitempty"` VolumeID string `json:"volumeId,omitempty"` }
type Factory ¶
Factory is a function that returns a cloud.ClusterManager. The config parameter provides an io.Reader handler to the factory in order to load specific configurations. If no configuration is provided the parameter is nil.
type Interface ¶
type Interface interface { NewOptions() interface{} Initialize() error Init() error Attach(options interface{}, nodeName string) (device string, err error) Detach(device, nodeName string) error MountDevice(mountDir string, device string, options interface{}) error Mount(mountDir string, options interface{}) error Unmount(mountDir string) error }
func GetCloudManager ¶
GetCloudManager creates an instance of the named cloud provider, or nil if the name is not known. The error return is only used if the named provider was known but failed to initialize. The config parameter specifies the io.Reader handler of the configuration file for the cloud provider, or nil for no configuation.