rest

package
v2.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: MIT Imports: 11 Imported by: 0

README

Simple REST api for interacting with the orchestrator.

This is NOT how nodes communicate with it and is entirely optional.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicResponse

type BasicResponse struct {
	Message string
	Error   bool
}

type Client

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

func NewClient

func NewClient(addr string) *Client

func (*Client) BlacklistNode

func (c *Client) BlacklistNode(node string) (msg string, err error)

func (*Client) GetDeployedVersion

func (c *Client) GetDeployedVersion() (version string, err error)

func (*Client) GetStatus

func (c *Client) GetStatus() (status *StatusResponse, err error)

func (*Client) MigrateAllNodesToNewNodes

func (c *Client) MigrateAllNodesToNewNodes() (msg string, err error)

func (*Client) MigrateNode

func (c *Client) MigrateNode(originNodeID, newNodeID string, shutdown bool) (msg string, err error)

func (*Client) MigrateShard

func (c *Client) MigrateShard(newNodeID string, shard int) (msg string, err error)

func (*Client) PullNewVersion

func (c *Client) PullNewVersion() (newVersion string, err error)

func (*Client) ShutdownNode

func (c *Client) ShutdownNode(nodeID string) (msg string, err error)

func (*Client) StartNewNode

func (c *Client) StartNewNode() (msg string, err error)

func (*Client) StopShard

func (c *Client) StopShard(shard int) (msg string, err error)

type RESTAPI

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

func NewRESTAPI

func NewRESTAPI(orchestrator *orchestrator.Orchestrator, listenAddr string) *RESTAPI

func (*RESTAPI) Run

func (ra *RESTAPI) Run() error

type StatusResponse

type StatusResponse struct {
	Nodes []*orchestrator.NodeStatus
}

Jump to

Keyboard shortcuts

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