cloud

package
v0.0.0-...-d75ab9c Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
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

This section is empty.

Functions

func CloudManagers

func CloudManagers() []string

CloudManagers returns the name of all registered cloud providers in a string slice

func IsCloudManager

func IsCloudManager(name string) bool

IsCloudManager returns true if name corresponds to an already registered cloud provider.

func RegisterCloudManager

func RegisterCloudManager(name string, cloud Factory)

RegisterCloudManager registers a cloud.Factory by name. This is expected to happen during app startup.

Types

type Client

type Client struct {
	Kube          kubernetes.Interface
	ServerVersion string
}

func InitializeClient

func InitializeClient(opt *options.Config) *Client

type Factory

type Factory func(ctx context.Context) (Interface, error)

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 {
	Init() (controller.Provisioner, error)
	Namer() controller.Namer
}

func GetCloudManager

func GetCloudManager(name string, ctx context.Context) (Interface, error)

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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