mxui

package
v1.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ConstManageNodeID = 0
View Source
const ConstRpcClientMaxMsgSize = 10 * 1024 * 1024
View Source
const ConstRpcClientSendBroadcast = -1

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	FuncSchema *schema.Reflector
	// contains filtered or unexported fields
}

func InitMXUIClient added in v1.0.5

func InitMXUIClient(config ClientConfig) (*Client, error)

func (*Client) CheckNodeResourceWithByte

func (client *Client) CheckNodeResourceWithByte(name string, data []byte) (*protoManage.NodeResource, error)

func (*Client) CheckNodeResourceWithFile

func (client *Client) CheckNodeResourceWithFile(filePath string) (*protoManage.NodeResource, error)

func (*Client) Close

func (client *Client) Close()

func (*Client) DownloadNodeResourceWithBytes

func (client *Client) DownloadNodeResourceWithBytes(url string) (string, []byte, error)

func (*Client) DownloadNodeResourceWithFile

func (client *Client) DownloadNodeResourceWithFile(url string, filePath string) (uErr error)

func (*Client) RegisterNodeFunc

func (client *Client) RegisterNodeFunc(nodeFunc NodeFuncRegister) error

func (*Client) RegisterNodeReport

func (client *Client) RegisterNodeReport(nodeReport NodeReportRegister) error

func (*Client) RpcServeConnected

func (client *Client) RpcServeConnected(rpcKeepalive *Jrpc.RpcKeepalive, isReConnect bool)

func (*Client) RpcServeDisconnected

func (client *Client) RpcServeDisconnected(rpcKeepalive *Jrpc.RpcKeepalive, isCloseByUser bool)

func (*Client) RpcStreamClosed

func (client *Client) RpcStreamClosed(stream *Jrpc.RpcStream) error

func (*Client) RpcStreamConnect

func (client *Client) RpcStreamConnect(stream *Jrpc.RpcStream) (interface{}, error)

func (*Client) RpcStreamConnected

func (client *Client) RpcStreamConnected(stream *Jrpc.RpcStream) error

func (*Client) RpcStreamError

func (client *Client) RpcStreamError(text string, err error)

func (*Client) RpcStreamReceiver

func (client *Client) RpcStreamReceiver(stream *Jrpc.RpcStream, recv interface{}) error

func (*Client) SendNodeNotify

func (client *Client) SendNodeNotify(msg string, nodeNotifyLevel NodeNotifyLevel, show bool) error

func (*Client) UpdateReportVal

func (client *Client) UpdateReportVal(name string, nodeReportData interface{}) error

func (*Client) UploadNodeResourceWithBytes

func (client *Client) UploadNodeResourceWithBytes(name string, data []byte) (*protoManage.NodeResource, error)

func (*Client) UploadNodeResourceWithFile

func (client *Client) UploadNodeResourceWithFile(filePath string) (*protoManage.NodeResource, error)

type ClientConfig

type ClientConfig struct {
	Addr           string
	PublicKeyPath  string
	CertName       string
	NodeName       string
	ConnectTimeOut time.Duration
	RequestTimeOut time.Duration
	KeepaliveTime  time.Duration
	NotifyCall     func(nodeNotify NodeNotify)
}

type NodeFuncRegister

type NodeFuncRegister struct {
	Name     string
	CallFunc interface{}
	Level    UserLevel
	// contains filtered or unexported fields
}

type NodeFuncReturnCharts

type NodeFuncReturnCharts struct {
	Data map[string]interface{}
}

type NodeFuncReturnFile

type NodeFuncReturnFile struct {
	Name string
	ID   int64
}

type NodeFuncReturnImage

type NodeFuncReturnImage struct {
	URL string
	Fit string
}

type NodeFuncReturnJson

type NodeFuncReturnJson struct {
	Data interface{}
}
type NodeFuncReturnLink struct {
	Name  string
	Link  string
	Blank bool
}

type NodeFuncReturnMedia

type NodeFuncReturnMedia struct {
	URL  string
	Type string
	Live bool
	Loop bool
}

type NodeFuncReturnTable

type NodeFuncReturnTable struct {
	Stripe      bool
	Border      bool
	IndexCol    NodeFuncReturnTableCol
	ShowSummary bool
	SumText     string
	Col         []NodeFuncReturnTableCol
	Row         []NodeFuncReturnTableRow
}

func (*NodeFuncReturnTable) AddTableCol

func (table *NodeFuncReturnTable) AddTableCol(col NodeFuncReturnTableCol)

func (*NodeFuncReturnTable) AddTableRow

func (table *NodeFuncReturnTable) AddTableRow(row NodeFuncReturnTableRow)

type NodeFuncReturnTableCol

type NodeFuncReturnTableCol struct {
	Name         string
	Width        uint32
	Fixed        string
	Align        string
	Resizable    bool
	MergeSameCol bool
}

type NodeFuncReturnTableRow

type NodeFuncReturnTableRow struct {
	Value        []interface{}
	MergeSameRow bool
}

type NodeFuncReturnTableVal

type NodeFuncReturnTableVal struct {
	Data  interface{}
	State DataState
}

type NodeFuncReturnText

type NodeFuncReturnText struct {
	Data interface{}
}

type NodeNotify

type NodeNotify protoManage.NodeNotify

type NodeReportData

type NodeReportData struct {
	ValueList []NodeReportVal
}

type NodeReportRegister

type NodeReportRegister struct {
	Name         string
	Type         NodeReportType
	CallFunc     interface{}
	CallInterval time.Duration
	Level        UserLevel
}

type NodeReportVal

type NodeReportVal struct {
	Value interface{}
	State protoManage.State
}

type NodeReportValue

type NodeReportValue struct {
	Data  interface{}
	State DataState
}

type NodeState

type NodeState int32

type UserLevel

type UserLevel int32
const (
	UserLevelLevelVisitor      UserLevel = 1
	UserLevelLevelMember       UserLevel = 2
	UserLevelLevelManager      UserLevel = 3
	UserLevelLevelSuperManager UserLevel = 4
)

Jump to

Keyboard shortcuts

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