operator

package
v0.0.0-...-b606183 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(serverName, listenAddr, nodesGovAddr, signerKeyWIF string,
	bootstrapRpcURLs []string, privateUrls []string, _withChaos bool)

Types

type OpInfo

type OpInfo struct {
	Status           string            `json:"status"`
	CurrNodes        []sbch.NodeInfo   `json:"currNodes,omitempty"`
	NewNodes         []sbch.NodeInfo   `json:"newNodes,omitempty"`
	NodesChangedTime int64             `json:"nodesChangedTime,omitempty"`
	Monitors         []gethcmn.Address `json:"monitors,omitempty"`
}

type Resp

type Resp struct {
	Success bool   `json:"success"`
	Error   string `json:"error,omitempty"`
	Result  any    `json:"result,omitempty"`
}

func NewErrResp

func NewErrResp(err string) Resp

func NewOkResp

func NewOkResp(result any) Resp

func NewResp

func NewResp(result any, err error) Resp

func UnmarshalResp

func UnmarshalResp(jsonBytes []byte) (resp Resp)

func (Resp) ToJSON

func (resp Resp) ToJSON() []byte

func (Resp) WriteTo

func (resp Resp) WriteTo(w http.ResponseWriter)

Jump to

Keyboard shortcuts

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