lxstate

package
v0.0.0-...-c76ca94 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodePool

type NodePool struct {
	// contains filtered or unexported fields
}

func (*NodePool) AddNode

func (nodePool *NodePool) AddNode(node *lxtypes.Node) error

func (*NodePool) DeleteNode

func (nodePool *NodePool) DeleteNode(nodeId string) error

func (*NodePool) GetKey

func (nodePool *NodePool) GetKey() string

func (*NodePool) GetNode

func (nodePool *NodePool) GetNode(nodeId string) (*lxtypes.Node, error)

func (*NodePool) GetNodeResourcePool

func (nodePool *NodePool) GetNodeResourcePool(nodeId string) (*ResourcePool, error)

func (*NodePool) GetNodeTaskPool

func (nodePool *NodePool) GetNodeTaskPool(nodeId string) (*TaskPool, error)

func (*NodePool) GetNodes

func (nodePool *NodePool) GetNodes() (map[string]*lxtypes.Node, error)

func (*NodePool) Initialize

func (nodePool *NodePool) Initialize() error

type ResourcePool

type ResourcePool struct {
	// contains filtered or unexported fields
}

func TempResourcePoolFunction

func TempResourcePoolFunction(rootKey, nodeId string) *ResourcePool

func (*ResourcePool) AddResource

func (resourcePool *ResourcePool) AddResource(resource *lxtypes.Resource) error

func (*ResourcePool) DeleteResource

func (resourcePool *ResourcePool) DeleteResource(resourceId string) error

func (*ResourcePool) GetKey

func (resourcePool *ResourcePool) GetKey() string

func (*ResourcePool) GetResource

func (resourcePool *ResourcePool) GetResource(resourceId string) (*lxtypes.Resource, error)

func (*ResourcePool) GetResources

func (resourcePool *ResourcePool) GetResources() (map[string]*lxtypes.Resource, error)

func (*ResourcePool) Initialize

func (resourcePool *ResourcePool) Initialize() error

func (*ResourcePool) ModifyResource

func (resourcePool *ResourcePool) ModifyResource(resourceId string, modifiedResource *lxtypes.Resource) error

type RpiPool

type RpiPool struct {
	// contains filtered or unexported fields
}

func (*RpiPool) AddRpi

func (RpiPool *RpiPool) AddRpi(rpi *layerx_rpi_client.RpiInfo) error

func (*RpiPool) DeleteRpi

func (RpiPool *RpiPool) DeleteRpi(name string) error

func (*RpiPool) GetKey

func (RpiPool *RpiPool) GetKey() string

func (*RpiPool) GetRpi

func (RpiPool *RpiPool) GetRpi(name string) (*layerx_rpi_client.RpiInfo, error)

func (*RpiPool) GetRpis

func (RpiPool *RpiPool) GetRpis() (map[string]*layerx_rpi_client.RpiInfo, error)

func (*RpiPool) Initialize

func (RpiPool *RpiPool) Initialize() error

type State

type State struct {
	PendingTaskPool        *TaskPool
	StagingTaskPool        *TaskPool
	NodePool               *NodePool
	TaskProviderPool       *TaskProviderPool
	FailedTaskProviderPool *TaskProviderPool
	StatusPool             *StatusPool
	RpiPool                *RpiPool
}

func NewState

func NewState() *State

func (*State) GetAllTasks

func (state *State) GetAllTasks() (map[string]*lxtypes.Task, error)

func (*State) GetResourcePoolContainingResource

func (state *State) GetResourcePoolContainingResource(resourceID string) (*ResourcePool, error)

func (*State) GetRpiUrls

func (state *State) GetRpiUrls() []string

plural

func (*State) GetStatusUpdates

func (state *State) GetStatusUpdates() (map[string]*mesosproto.TaskStatus, error)

func (*State) GetStatusUpdatesForTaskProvider

func (state *State) GetStatusUpdatesForTaskProvider(tpId string) (map[string]*mesosproto.TaskStatus, error)

func (*State) GetTaskFromAnywhere

func (state *State) GetTaskFromAnywhere(taskId string) (*lxtypes.Task, error)

func (*State) GetTaskPoolContainingTask

func (state *State) GetTaskPoolContainingTask(taskId string) (*TaskPool, error)

func (*State) GetTpi

func (state *State) GetTpi() (string, error)

func (*State) GetTpiUrl

func (state *State) GetTpiUrl() string

singluar (for now)

func (*State) InitializeState

func (state *State) InitializeState(etcdUrl string) error

func (*State) SetTpi

func (state *State) SetTpi(tpiUrl string) error

type StatusPool

type StatusPool struct {
	// contains filtered or unexported fields
}

func (*StatusPool) AddStatus

func (statusPool *StatusPool) AddStatus(status *mesosproto.TaskStatus) error

func (*StatusPool) DeleteStatus

func (statusPool *StatusPool) DeleteStatus(statusId string) error

func (*StatusPool) GetKey

func (statusPool *StatusPool) GetKey() string

func (*StatusPool) GetStatus

func (statusPool *StatusPool) GetStatus(statusId string) (*mesosproto.TaskStatus, error)

func (*StatusPool) GetStatuses

func (statusPool *StatusPool) GetStatuses() (map[string]*mesosproto.TaskStatus, error)

func (*StatusPool) Initialize

func (statusPool *StatusPool) Initialize() error

func (*StatusPool) ModifyStatus

func (statusPool *StatusPool) ModifyStatus(statusId string, modifiedStatus *mesosproto.TaskStatus) error

type TaskPool

type TaskPool struct {
	// contains filtered or unexported fields
}

func (*TaskPool) AddTask

func (taskPool *TaskPool) AddTask(task *lxtypes.Task) error

func (*TaskPool) DeleteTask

func (taskPool *TaskPool) DeleteTask(taskId string) error

func (*TaskPool) GetKey

func (taskPool *TaskPool) GetKey() string

func (*TaskPool) GetTask

func (taskPool *TaskPool) GetTask(taskId string) (*lxtypes.Task, error)

func (*TaskPool) GetTasks

func (taskPool *TaskPool) GetTasks() (map[string]*lxtypes.Task, error)

func (*TaskPool) Initialize

func (taskPool *TaskPool) Initialize() error

func (*TaskPool) ModifyTask

func (taskPool *TaskPool) ModifyTask(taskId string, modifiedTask *lxtypes.Task) error

type TaskProviderPool

type TaskProviderPool struct {
	// contains filtered or unexported fields
}

func (*TaskProviderPool) AddTaskProvider

func (taskProviderPool *TaskProviderPool) AddTaskProvider(taskProvider *lxtypes.TaskProvider) error

func (*TaskProviderPool) DeleteTaskProvider

func (taskProviderPool *TaskProviderPool) DeleteTaskProvider(taskProviderId string) error

func (*TaskProviderPool) GetKey

func (taskProviderPool *TaskProviderPool) GetKey() string

func (*TaskProviderPool) GetTaskProvider

func (taskProviderPool *TaskProviderPool) GetTaskProvider(taskProviderId string) (*lxtypes.TaskProvider, error)

func (*TaskProviderPool) GetTaskProviders

func (taskProviderPool *TaskProviderPool) GetTaskProviders() (map[string]*lxtypes.TaskProvider, error)

func (*TaskProviderPool) Initialize

func (taskProviderPool *TaskProviderPool) Initialize() error

Jump to

Keyboard shortcuts

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