Documentation ¶
Overview ¶
Package cloudcfg is ...
Index ¶
- func DeleteController(name string, client client.ClientInterface) error
- func DoRequest(request *http.Request, auth *client.AuthInfo) (string, error)
- func LoadAuthInfo(path string) (*client.AuthInfo, error)
- func RequestWithBody(configFile, url, method string) (*http.Request, error)
- func RunController(image, name string, replicas int, client client.ClientInterface, ...) error
- func StopController(name string, client client.ClientInterface) error
- func Update(name string, client client.ClientInterface, updatePeriod time.Duration) error
- type HumanReadablePrinter
- type IdentityPrinter
- type ResourcePrinter
- type YAMLPrinter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteController ¶
func DeleteController(name string, client client.ClientInterface) error
DeleteController deletes a replication controller named 'name', requires that the controller already be stopped
func LoadAuthInfo ¶
Parse an AuthInfo object from a file path. Prompt user and create file if it doesn't exist.
func RequestWithBody ¶
RequestWithBody is a helper method that creates an HTTP request with the specified url, method and a body read from 'configFile' FIXME: need to be public API?
func RunController ¶
func RunController(image, name string, replicas int, client client.ClientInterface, portSpec string, servicePort int) error
RunController creates a new replication controller named 'name' which creates 'replicas' pods running 'image'
func StopController ¶
func StopController(name string, client client.ClientInterface) error
StopController stops a controller named 'name' by setting replicas to zero
Types ¶
type HumanReadablePrinter ¶
type HumanReadablePrinter struct{}
HumanReadablePrinter attempts to provide more elegant output
type IdentityPrinter ¶
type IdentityPrinter struct{}
Identity printer simply copies the body out to the output stream
type ResourcePrinter ¶
type ResourcePrinter interface { // Print receives an arbitrary JSON body, formats it and prints it to a writer Print(string, io.Writer) error }
ResourcePrinter is an interface that knows how to print API resources