Documentation ¶
Overview ¶
Copyright (C) 2013 The Docker Cloud authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (C) 2013 The Docker Cloud authors ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func Aggregate() beam.Sender
- func CloudBackend() engine.Installer
- func ConfigureGCE(clientId, clientSecret, scope, projectId string) error
- func Debug() beam.Sender
- func DockerClient() beam.Sender
- func DockerClientWithConfig(config *DockerClientConfig) beam.Sender
- func DockerServer() beam.Sender
- func Exec() beam.Sender
- func FakeClient() beam.Sender
- func New() *beam.Object
- func Orchard() beam.Sender
- func RandomString() string
- func Shipyard() beam.Sender
- func Simulator() beam.Sender
- func Tutum() engine.Installer
- type Cloud
- type Container
- type DockerClientConfig
- type DockerHttpClient
- func (client *DockerHttpClient) Call(method, path, body string) (*http.Response, error)
- func (client *DockerHttpClient) Delete(path, data string) (resp *http.Response, err error)
- func (client *DockerHttpClient) Get(path, data string) (resp *http.Response, err error)
- func (client *DockerHttpClient) Post(path, data string) (resp *http.Response, err error)
- func (client *DockerHttpClient) Put(path, data string) (resp *http.Response, err error)
- type GCECloud
- func (cloud GCECloud) CreateInstance(name string, zone string) (string, error)
- func (cloud GCECloud) DeleteInstance(name string, zone string) error
- func (cloud GCECloud) GetPublicIPAddress(name string, zone string) (string, error)
- func (cloud GCECloud) OpenSecureTunnel(name, zone string, localPort, remotePort int) (*os.Process, error)
- type HostContext
- type HostContextCache
- type HttpApiFunc
- type HttpClient
- type RaxCloud
- type Tunnel
Constants ¶
const (
DASS_TARGET_PREFIX = "rdas_target_"
)
Variables ¶
var ( // ErrNoAuthUrl errors occur when the value of the OS_AUTH_URL environment variable cannot be determined. ErrNoAuthUrl = fmt.Errorf("Environment variable OS_AUTH_URL needs to be set.") // ErrNoUsername errors occur when the value of the OS_USERNAME environment variable cannot be determined. ErrNoUsername = fmt.Errorf("Environment variable OS_USERNAME needs to be set.") // ErrNoPassword errors occur when the value of the OS_PASSWORD environment variable cannot be determined. ErrNoPassword = fmt.Errorf("Environment variable OS_PASSWORD or OS_API_KEY needs to be set.") )
Functions ¶
func CloudBackend ¶
func ConfigureGCE ¶
func DockerClient ¶
func DockerClientWithConfig ¶
func DockerClientWithConfig(config *DockerClientConfig) beam.Sender
func DockerServer ¶
func FakeClient ¶
Types ¶
type Cloud ¶
type Cloud interface { // GetPublicIPAddress returns the stringified address (e.g "1.2.3.4") of the runtime GetPublicIPAddress(name string, zone string) (string, error) // CreateInstance creates a virtual machine instance given a name and a zone. Returns the // IP address of the instance. Waits until Docker is up and functioning on the machine // before returning. CreateInstance(name string, zone string) (string, error) // DeleteInstance deletes a virtual machine instance, given the instance name and zone. DeleteInstance(name string, zone string) error // Open a secure tunnel (generally SSH) between the local host and a remote host. OpenSecureTunnel(name string, zone string, localPort int, remotePort int) (*os.Process, error) }
The Cloud interface provides the contract that cloud providers should implement to enable running Docker containers in their cloud. TODO(bburns): Restructure this into Cloud, Instance and Tunnel interfaces
type DockerClientConfig ¶
type DockerHttpClient ¶
func (*DockerHttpClient) Call ¶
func (client *DockerHttpClient) Call(method, path, body string) (*http.Response, error)
func (*DockerHttpClient) Delete ¶
func (client *DockerHttpClient) Delete(path, data string) (resp *http.Response, err error)
func (*DockerHttpClient) Get ¶
func (client *DockerHttpClient) Get(path, data string) (resp *http.Response, err error)
type GCECloud ¶
type GCECloud struct {
// contains filtered or unexported fields
}
A Google Compute Engine implementation of the Cloud interface
func NewCloudGCE ¶
Create a GCE Cloud instance. 'clientId', 'clientSecret' and 'scope' are used to ask for a client credential. 'code' is optional and is only used if a cached credential can not be found. 'projectId' is the Google Cloud project name.
func (GCECloud) CreateInstance ¶
Implementation of the Cloud interface
func (GCECloud) DeleteInstance ¶
Implementation of the Cloud interface
func (GCECloud) GetPublicIPAddress ¶
Implementation of the Cloud interface
type HostContext ¶
type HostContext struct {
// contains filtered or unexported fields
}
func NewHostContext ¶
func NewHostContext(id, name string, rax *RaxCloud) (hc *HostContext, err error)
func (*HostContext) Close ¶
func (hc *HostContext) Close()
type HostContextCache ¶
type HostContextCache struct {
// contains filtered or unexported fields
}
A HostContext represents an active session with a cloud host
func NewHostContextCache ¶
func NewHostContextCache() (contextCache *HostContextCache)
func (*HostContextCache) Close ¶
func (hcc *HostContextCache) Close()
func (*HostContextCache) Get ¶
func (hcc *HostContextCache) Get(id, name string, rax *RaxCloud) (context *HostContext, err error)
func (*HostContextCache) GetCached ¶
func (hcc *HostContextCache) GetCached(id, name string, rax *RaxCloud) (context *HostContext, err error)
type HttpApiFunc ¶
type HttpClient ¶
type HttpClient interface { Call(method, path, body string) (*http.Response, error) Get(path, data string) (resp *http.Response, err error) Delete(path, data string) (resp *http.Response, err error) Post(path, data string) (resp *http.Response, err error) Put(path, data string) (resp *http.Response, err error) }
HTTP Client with some syntax sugar
type RaxCloud ¶
type RaxCloud struct {
// contains filtered or unexported fields
}
A Rackspace impl of the cloud provider interface
func RaxCloudBackend ¶
func RaxCloudBackend() *RaxCloud
Returns a pointer to a new RaxCloud instance