iaas

package
v0.0.0-...-4eaaba6 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2014 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package provision provides interfaces that need to be satisfied in order to implement a new iaas on tsuru.

Package provision provides interfaces that need to be satisfied in order to implement a new iaas on tsuru.

Index

Constants

View Source
const UserData = `#!/bin/bash
curl -sL https://raw.github.com/tsuru/now/master/run.bash | bash -s -- --docker-only
`

Variables

This section is empty.

Functions

func Describe

func Describe(iaasName ...string) (string, error)

func RegisterIaasProvider

func RegisterIaasProvider(name string, iaas IaaS)

Types

type CustomIaaS

type CustomIaaS interface {
	IaaS
	Clone(string) IaaS
}

type Describer

type Describer interface {
	Describe() string
}

type IaaS

type IaaS interface {
	// Called when tsuru is creating a Machine.
	CreateMachine(params map[string]string) (*Machine, error)

	// Called when tsuru is destroying a Machine.
	DeleteMachine(m *Machine) error
}

Every Tsuru IaaS must implement this interface.

type Machine

type Machine struct {
	Id             string `bson:"_id"`
	Iaas           string
	Status         string
	Address        string
	CreationParams map[string]string
}

func CreateMachine

func CreateMachine(params map[string]string) (*Machine, error)

func CreateMachineForIaaS

func CreateMachineForIaaS(iaasName string, params map[string]string) (*Machine, error)

func FindMachineByAddress

func FindMachineByAddress(address string) (Machine, error)

func FindMachineById

func FindMachineById(id string) (Machine, error)

func ListMachines

func ListMachines() ([]Machine, error)

func (*Machine) Destroy

func (m *Machine) Destroy() error

func (*Machine) FormatNodeAddress

func (m *Machine) FormatNodeAddress() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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