layerx_brain_client

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: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GetPendingTasks  = "/GetPendingTasks"
	GetStagingTasks  = "/GetStagingTasks"
	GetNodes         = "/GetNodes"
	GetStatusUpdates = "/GetStatusUpdates"
	AssignTasks      = "/AssignTasks"
	MigrateTasks     = "/MigrateTasks"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BrainAssignTasksMessage

type BrainAssignTasksMessage struct {
	NodeId  string   `json:"node_id"`
	TaskIds []string `json:"task_ids"`
}

type LayerXBrainClient

type LayerXBrainClient struct {
	CoreURL string
}

func (*LayerXBrainClient) AssignTasks

func (brainClient *LayerXBrainClient) AssignTasks(nodeId string, taskIds ...string) error

call this method to assign tasks to a node

func (*LayerXBrainClient) GetNodes

func (brainClient *LayerXBrainClient) GetNodes() ([]*lxtypes.Node, error)

call this method to see submitted nodes and their resources

func (*LayerXBrainClient) GetPendingTasks

func (brainClient *LayerXBrainClient) GetPendingTasks() ([]*lxtypes.Task, error)

call this method to see unassigned tasks

func (*LayerXBrainClient) GetStagingTasks

func (brainClient *LayerXBrainClient) GetStagingTasks() ([]*lxtypes.Task, error)

call this method to see unassigned tasks

func (*LayerXBrainClient) GetStatusUpdates

func (brainClient *LayerXBrainClient) GetStatusUpdates() ([]*mesosproto.TaskStatus, error)

call this method to see most recent status updates for all tasks

func (*LayerXBrainClient) MigrateTasks

func (brainClient *LayerXBrainClient) MigrateTasks(destinationNodeId string, taskIds ...string) error

call this method to migrate running tasks from one node to another

type MigrateTaskMessage

type MigrateTaskMessage struct {
	DestinationNodeId string   `json:"destination_node_id"`
	TaskIds           []string `json:"task_ids"`
}

Jump to

Keyboard shortcuts

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