api

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RPCToEngineList

func RPCToEngineList(obj *rpc.EngineListResponse) map[string]*Engine

func RPCToProcessList

func RPCToProcessList(obj *rpc.ProcessListResponse) map[string]*Process

Types

type Engine

type Engine struct {
	Name       string   `json:"name"`
	VolumeName string   `json:"volumeName"`
	Binary     string   `json:"binary"`
	ListenIP   string   `json:"listenIP"`
	Listen     string   `json:"listen"`
	Size       int64    `json:"size"`
	Frontend   string   `json:"frontend"`
	Backends   []string `json:"backends"`
	Replicas   []string `json:"replicas"`

	ProcessStatus ProcessStatus `json:"processStatus"`
	Endpoint      string        `json:"endpoint"`

	Deleted bool `json:"deleted"`
}

func RPCToEngine

func RPCToEngine(obj *rpc.EngineResponse) *Engine

type EngineStream

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

func (*EngineStream) Close

func (s *EngineStream) Close() error

func (*EngineStream) Recv

func (s *EngineStream) Recv() (*Engine, error)

type LogStream

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

func (*LogStream) Close

func (s *LogStream) Close() error

func (*LogStream) Recv

func (s *LogStream) Recv() (string, error)

type Process

type Process struct {
	Name      string   `json:"name"`
	Binary    string   `json:"binary"`
	Args      []string `json:"args"`
	PortCount int32    `json:"portCount"`
	PortArgs  []string `json:"portArgs"`

	ProcessStatus ProcessStatus `json:"processStatus"`

	Deleted bool `json:"deleted"`
}

func RPCToProcess

func RPCToProcess(obj *rpc.ProcessResponse) *Process

type ProcessStatus

type ProcessStatus struct {
	State     string `json:"state"`
	ErrorMsg  string `json:"errorMsg"`
	PortStart int32  `json:"portStart"`
	PortEnd   int32  `json:"portEnd"`
}

func RPCToProcessStatus

func RPCToProcessStatus(obj *rpc.ProcessStatus) ProcessStatus

type ProcessStream

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

func (*ProcessStream) Close

func (s *ProcessStream) Close() error

func (*ProcessStream) Recv

func (s *ProcessStream) Recv() (*Process, error)

Jump to

Keyboard shortcuts

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