oneflow

package
v0.0.0-...-69eda68 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2017 License: MPL-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*client.OneflowClient
}

func Session

func Session(c *client.OneflowClient) *Client

func (*Client) CreateServiceTemplate

func (s *Client) CreateServiceTemplate(st *ServiceTemplate) (string, error)

func (*Client) DestroyService

func (s *Client) DestroyService(servID string) error

func (*Client) DestroyServiceTemplate

func (s *Client) DestroyServiceTemplate(tempID string) error

func (*Client) InstanciateService

func (s *Client) InstanciateService(tempID string) (string, error)

type ElasticityPolicy

type ElasticityPolicy struct {
	Type          string `json:"type"`
	Adjust        int    `json:"adjust"`
	MinAdjustStep int    `json:"min_adjust_step"`
	Expression    string `json:"expression"`
	PeriodNumber  int    `json:"period_number"`
	Period        int    `json:"period"`
	Cooldown      int    `json:"cooldown"`
}

type Role

type Role struct {
	Name               string             `json:"name"`
	Cardinality        int                `json:"cardinality"`
	VMTemplate         int                `json:"vm_template"`
	VMTemplateContents string             `json:"vm_template_contents,omitempty"`
	Parents            []string           `json:"parents"`
	ShutdownAction     string             `json:"shutdown_action,omitempty"`
	MinVMs             int                `json:"min_vms"`
	MaxVMs             int                `json:"max_vms"`
	Cooldown           int                `json:"cooldown"`
	ElasticityPolicies []ElasticityPolicy `json:"elasticity_policies"`
	ScheduledPolicies  []ScheduledPolicy  `json:"scheduled_policies"`
}

type ScheduledPolicy

type ScheduledPolicy struct {
	Type          string `json:"type"`
	Adjust        int    `json:"adjust"`
	MinAdjustStep int    `json:"min_adjust_step"`
	Recurrence    string `json:"recurrence"`
	StartTime     string `json:"start_time"`
}

type ServiceResponseTemplate

type ServiceResponseTemplate struct {
	Document struct {
		ID string `json:"ID"`
	} `json:"DOCUMENT"`
}

type ServiceTemplate

type ServiceTemplate struct {
	ID              string         `json:"id,omitempty"`
	Name            string         `json:"name"`
	Deployment      string         `json:"deployment"`
	ShutdownAction  string         `json:"shutdown_action,omitempty"`
	ReadyStatusGate bool           `json:"ready_status_gate,omitempty"`
	Roles           []Role         `json:"roles"`
	CustomAttrs     util.StringMap `json:"custom_attrs,omitempty"`
}

Jump to

Keyboard shortcuts

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