layerx_rpi_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 (
	RegisterRpi        = "/RegisterRpi"
	SubmitResource     = "/SubmitResource"
	RescindResource    = "/RescindResource"
	SubmitStatusUpdate = "/SubmitStatusUpdate"
	GetNodes           = "/GetNodes"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LaunchTasksMessage

type LaunchTasksMessage struct {
	TasksToLaunch  []*lxtypes.Task     `json:"tasks_to_launch"`
	ResourcesToUse []*lxtypes.Resource `json:"resources_to_use"`
}

type LayerXRpi

type LayerXRpi struct {
	CoreURL string
	RpiName string
}

func (*LayerXRpi) GetNodes

func (rpi *LayerXRpi) GetNodes() ([]*lxtypes.Node, error)

call this method to see submitted nodes and their resources + tasks call this to see tasks that the specific RPI should care about. useful for knowing what tasks we should get status updates for TODO: flip all these things so that it's always one-way (i.e. the RPI should always be told, never have to ask)

func (*LayerXRpi) RegisterRpi

func (rpi *LayerXRpi) RegisterRpi(name, rpiUrl string) error

call this method to register the RPI with layerx

func (*LayerXRpi) RescindResource

func (rpi *LayerXRpi) RescindResource(resourceID string) error

call this method if a resource has been rescinded or is no longer valid / available

func (*LayerXRpi) SubmitResource

func (rpi *LayerXRpi) SubmitResource(resource *lxtypes.Resource) error

call this method when submitting a new resource from the rpi

func (*LayerXRpi) SubmitStatusUpdate

func (rpi *LayerXRpi) SubmitStatusUpdate(status *mesosproto.TaskStatus) error

call this method when submitting a status update from the rpi

type RpiInfo

type RpiInfo struct {
	Name string `json:"name"`
	Url  string `json:"rpi_url"`
}

Jump to

Keyboard shortcuts

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