groups_v1

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2018 License: MPL-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckGroupExistsByName added in v0.2.8

func CheckGroupExistsByName(ctx context.Context, groupName, accountID string) (bool, error)

func Create

func Create(w http.ResponseWriter, r *http.Request)

func Decrement

func Decrement(w http.ResponseWriter, r *http.Request)

func Delete

func Delete(w http.ResponseWriter, r *http.Request)

func DeleteOrchestratorJob

func DeleteOrchestratorJob(ctx context.Context, group *ServiceGroup) error

func Get

func Get(w http.ResponseWriter, r *http.Request)

func Increment

func Increment(w http.ResponseWriter, r *http.Request)

func List

func List(w http.ResponseWriter, r *http.Request)

func ListInstances

func ListInstances(w http.ResponseWriter, r *http.Request)

func RemoveGroup

func RemoveGroup(ctx context.Context, identifier string, accountID string) error

func SaveGroup

func SaveGroup(ctx context.Context, accountID string, group *ServiceGroup) error

func SubmitOrchestratorJob

func SubmitOrchestratorJob(ctx context.Context, group *ServiceGroup) error

func Update

func Update(w http.ResponseWriter, r *http.Request)

func UpdateGroup

func UpdateGroup(ctx context.Context, uuid string, accountID string, group *ServiceGroup) error

func UpdateOrchestratorJob

func UpdateOrchestratorJob(ctx context.Context, group *ServiceGroup) error

Types

type ActionableInput

type ActionableInput struct {
	InstanceCount int `json:"instance_count"` //Number of instances to decrement by
	MaxInstance   int `json:"max_instance"`   //Maximum number of instances allowed in group
	MinInstance   int `json:"min_instance"`   //Minimum number of instances allowed in group
}

func (*ActionableInput) Validate added in v0.2.7

func (i *ActionableInput) Validate() error

type OrchestratorJob

type OrchestratorJob struct {
	Datacenter        string
	JobName           string
	DesiredCount      int
	PackageID         string
	ImageID           string
	ServiceGroupName  string
	TemplateID        string
	UserData          string
	FirewallEnabled   bool
	Networks          []string
	Tags              map[string]string
	MetaData          map[string]string
	TritonAccount     string
	TritonURL         string
	TritonKeyID       string
	TritonKeyMaterial string
}

type ServiceGroup

type ServiceGroup struct {
	ID         string    `json:"id"`
	GroupName  string    `json:"group_name"`
	TemplateID string    `json:"template_id"`
	Capacity   int       `json:"capacity"`
	CreatedAt  time.Time `json:"created_at"`
	UpdatedAt  time.Time `json:"updated_at"`
}

func FindGroupByID

func FindGroupByID(ctx context.Context, key string, accountID string) (*ServiceGroup, bool)

func FindGroupByName

func FindGroupByName(ctx context.Context, name string, accountID string) (*ServiceGroup, bool)

func FindGroups

func FindGroups(ctx context.Context, accountID string) ([]*ServiceGroup, error)

Jump to

Keyboard shortcuts

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