client

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CancelTask

func CancelTask(host, id string) error

CancelTask cancels a task

func CreateTask

func CreateTask(host string, t *models.Task) (string, error)

CreateTask submits a task to be executed and return its ID

func DisableNode

func DisableNode(host, id string) error

DisableNode deactivates a computing note on master server

func EnableNode

func EnableNode(host string, n *models.Node) (id string, err error)

EnableNode activates a computing node on master server.

func GetNodeInfo

func GetNodeInfo(host string) (*models.Info, error)

GetNodeInfo retrieves server information

func GetTask

func GetTask(host, id string) (*models.Task, error)

GetTask gets a task by its ID

func ListNodes

func ListNodes(host string) ([]*models.Node, error)

ListNodes retrieves list of registered nodes on master server

func ListTasks

func ListTasks(host string) (*models.ListTasksResponse, error)

ListTasks gets all tasks

Types

type APIError

type APIError struct {
	Status     string
	StatusCode int
	Body       string
}

func (*APIError) Error

func (e *APIError) Error() string

type NetworkError

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

NetworkError hapens when something went wrong with network connection.

Jump to

Keyboard shortcuts

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