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 ¶
- func CloudBackend() engine.Installer
- func ConfigureGCE(clientId, clientSecret, scope, projectId string) error
- func Debug() engine.Installer
- func Forward() engine.Installer
- func New() *engine.Engine
- func Simulator() engine.Installer
- type Cloud
- type Container
- 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 Tunnel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloudBackend ¶
func ConfigureGCE ¶
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 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