Documentation ¶
Index ¶
- Constants
- type Client
- func (client *Client) CheckNodeResourceWithByte(name string, data []byte) (*protoManage.NodeResource, error)
- func (client *Client) CheckNodeResourceWithFile(filePath string) (*protoManage.NodeResource, error)
- func (client *Client) Close()
- func (client *Client) DownloadNodeResourceWithBytes(url string) (string, []byte, error)
- func (client *Client) DownloadNodeResourceWithFile(url string, filePath string) (uErr error)
- func (client *Client) RegisterNodeFunc(nodeFunc NodeFuncRegister) error
- func (client *Client) RegisterNodeReport(nodeReport NodeReportRegister) error
- func (client *Client) RpcServeConnected(rpcKeepalive *Jrpc.RpcKeepalive, isReConnect bool)
- func (client *Client) RpcServeDisconnected(rpcKeepalive *Jrpc.RpcKeepalive, isCloseByUser bool)
- func (client *Client) RpcStreamClosed(stream *Jrpc.RpcStream) error
- func (client *Client) RpcStreamConnect(stream *Jrpc.RpcStream) (interface{}, error)
- func (client *Client) RpcStreamConnected(stream *Jrpc.RpcStream) error
- func (client *Client) RpcStreamError(text string, err error)
- func (client *Client) RpcStreamReceiver(stream *Jrpc.RpcStream, recv interface{}) error
- func (client *Client) SendNodeNotify(msg string, nodeNotifyLevel NodeNotifyLevel, show bool) error
- func (client *Client) UpdateReportVal(name string, nodeReportData interface{}) error
- func (client *Client) UploadNodeResourceWithBytes(name string, data []byte) (*protoManage.NodeResource, error)
- func (client *Client) UploadNodeResourceWithFile(filePath string) (*protoManage.NodeResource, error)
- type ClientConfig
- type DataState
- type NodeFuncRegister
- type NodeFuncReturnCharts
- type NodeFuncReturnFile
- type NodeFuncReturnImage
- type NodeFuncReturnJson
- type NodeFuncReturnLink
- type NodeFuncReturnMedia
- type NodeFuncReturnTable
- type NodeFuncReturnTableCol
- type NodeFuncReturnTableRow
- type NodeFuncReturnTableVal
- type NodeFuncReturnText
- type NodeNotify
- type NodeNotifyLevel
- type NodeReportData
- type NodeReportRegister
- type NodeReportType
- type NodeReportVal
- type NodeReportValue
- type NodeState
- type UserLevel
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 ¶
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) DownloadNodeResourceWithBytes ¶
func (*Client) DownloadNodeResourceWithFile ¶
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) RpcStreamConnect ¶
func (*Client) RpcStreamConnected ¶
func (*Client) RpcStreamError ¶
func (*Client) RpcStreamReceiver ¶
func (*Client) SendNodeNotify ¶
func (client *Client) SendNodeNotify(msg string, nodeNotifyLevel NodeNotifyLevel, show bool) error
func (*Client) UpdateReportVal ¶
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 DataState ¶
type DataState int32
const ( DataStateInfo DataState = DataState(protoManage.State_StateUnknow) DataStateSuccess DataState = DataState(protoManage.State_StateNormal) DataStateWarn DataState = DataState(protoManage.State_StateWarn) DataStateError DataState = DataState(protoManage.State_StateError) )
type NodeFuncRegister ¶
type NodeFuncReturnCharts ¶
type NodeFuncReturnCharts struct {
Data map[string]interface{}
}
type NodeFuncReturnFile ¶
type NodeFuncReturnImage ¶
type NodeFuncReturnJson ¶
type NodeFuncReturnJson struct {
Data interface{}
}
type NodeFuncReturnLink ¶
type NodeFuncReturnMedia ¶
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 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 NodeNotifyLevel ¶
type NodeNotifyLevel int32
const ( NodeNotifyLevelInfo NodeNotifyLevel = NodeNotifyLevel(protoManage.State_StateUnknow) NodeNotifyLevelSuccess NodeNotifyLevel = NodeNotifyLevel(protoManage.State_StateNormal) NodeNotifyLevelWarn NodeNotifyLevel = NodeNotifyLevel(protoManage.State_StateWarn) NodeNotifyLevelError NodeNotifyLevel = NodeNotifyLevel(protoManage.State_StateError) )
type NodeReportData ¶
type NodeReportData struct {
ValueList []NodeReportVal
}
type NodeReportRegister ¶
type NodeReportRegister struct { Name string Type NodeReportType CallFunc interface{} CallInterval time.Duration Level UserLevel }
type NodeReportType ¶
type NodeReportType int32
const ( NodeReportTypeTable NodeReportType = NodeReportType(protoManage.NodeReportType_NodeReportTypeTable) NodeReportTypeLine NodeReportType = NodeReportType(protoManage.NodeReportType_NodeReportTypeLine) )
type NodeReportVal ¶
type NodeReportVal struct { Value interface{} State protoManage.State }
type NodeReportValue ¶
type NodeReportValue struct { Data interface{} State DataState }
type NodeState ¶
type NodeState int32
const ( NodeStateNormal NodeState = NodeState(protoManage.State_StateNormal) NodeStateAbnormal NodeState = NodeState(protoManage.State_StateWarn) NodeStateClose NodeState = NodeState(protoManage.State_StateError) )
Click to show internal directories.
Click to hide internal directories.