Documentation
¶
Overview ¶
Code generated by ksf2go 1.3.22, DO NOT EDIT. This file was generated from /home/cc/workspace/KsfGo/ksf/protocol/res/StatF.ksf Package statf comment
Code generated by ksf2go 1.3.22, DO NOT EDIT. This file was generated from /home/cc/workspace/KsfGo/ksf/protocol/res/StatF.ksf Package statf comment
Index ¶
- type ProxyInfo
- func (st *ProxyInfo) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error
- func (st *ProxyInfo) ReadFrom(readBuf *codec.Reader) error
- func (st *ProxyInfo) ResetDefault()
- func (st *ProxyInfo) WriteBlock(buf *codec.Buffer, tag byte) error
- func (st *ProxyInfo) WriteTo(buf *codec.Buffer) (err error)
- type StatF
- func (obj *StatF) AllEndpoints() (active []*endpoint.Endpoint, inactive []*endpoint.Endpoint)
- func (obj *StatF) Dispatch(ksfCtx context.Context, val interface{}, ksfReq *requestf.RequestPacket, ...) (err error)
- func (obj *StatF) Endpoints() (active []*endpoint.Endpoint)
- func (obj *StatF) GetServant() (servant *model.Servant)
- func (obj *StatF) KsfPing()
- func (obj *StatF) KsfPingWithContext(ksfCtx context.Context)
- func (obj *StatF) KsfSetProtocol(p model.Protocol)
- func (obj *StatF) KsfSetTimeout(timeout int)
- func (obj *StatF) ReportMicMsg(msg map[StatMicMsgHead]StatMicMsgBody, bFromClient bool, ...) (int32, error)
- func (obj *StatF) ReportMicMsgOneWayWithContext(ksfCtx context.Context, msg map[StatMicMsgHead]StatMicMsgBody, ...) (ret int32, err error)
- func (obj *StatF) ReportMicMsgWithContext(ksfCtx context.Context, msg map[StatMicMsgHead]StatMicMsgBody, ...) (ret int32, err error)
- func (obj *StatF) ReportSampleMsg(msg []StatSampleMsg, opts ...map[string]string) (int32, error)
- func (obj *StatF) ReportSampleMsgOneWayWithContext(ksfCtx context.Context, msg []StatSampleMsg, opts ...map[string]string) (ret int32, err error)
- func (obj *StatF) ReportSampleMsgWithContext(ksfCtx context.Context, msg []StatSampleMsg, opts ...map[string]string) (ret int32, err error)
- func (obj *StatF) SetOnCloseCallback(callback func(string))
- func (obj *StatF) SetOnConnectCallback(callback func(string))
- func (obj *StatF) SetPushCallback(callback func([]byte))
- func (obj *StatF) SetServant(servant model.Servant)
- type StatFServant
- type StatFServantWithContext
- type StatMicMsgBody
- func (st *StatMicMsgBody) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error
- func (st *StatMicMsgBody) ReadFrom(readBuf *codec.Reader) error
- func (st *StatMicMsgBody) ResetDefault()
- func (st *StatMicMsgBody) WriteBlock(buf *codec.Buffer, tag byte) error
- func (st *StatMicMsgBody) WriteTo(buf *codec.Buffer) (err error)
- type StatMicMsgHead
- func (st *StatMicMsgHead) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error
- func (st *StatMicMsgHead) ReadFrom(readBuf *codec.Reader) error
- func (st *StatMicMsgHead) ResetDefault()
- func (st *StatMicMsgHead) WriteBlock(buf *codec.Buffer, tag byte) error
- func (st *StatMicMsgHead) WriteTo(buf *codec.Buffer) (err error)
- type StatSampleMsg
- func (st *StatSampleMsg) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error
- func (st *StatSampleMsg) ReadFrom(readBuf *codec.Reader) error
- func (st *StatSampleMsg) ResetDefault()
- func (st *StatSampleMsg) WriteBlock(buf *codec.Buffer, tag byte) error
- func (st *StatSampleMsg) WriteTo(buf *codec.Buffer) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProxyInfo ¶
type ProxyInfo struct {
BFromClient bool `json:"bFromClient" ksf:"bFromClient,tag:0,require:true"`
}
ProxyInfo struct implement
func (*ProxyInfo) ReadBlock ¶
ReadBlock reads struct from the given tag , require or optional.
func (*ProxyInfo) ReadFrom ¶
ReadFrom reads from readBuf and put into struct.
func (*ProxyInfo) WriteBlock ¶
WriteBlock encode struct
type StatF ¶
type StatF struct {
// contains filtered or unexported fields
}
StatF struct
func (*StatF) AllEndpoints ¶ added in v1.4.39
Endpoints returns all endpoint.Endpoint
func (*StatF) Dispatch ¶
func (obj *StatF) Dispatch(ksfCtx context.Context, val interface{}, ksfReq *requestf.RequestPacket, ksfResp *requestf.ResponsePacket, withContext bool) (err error)
Dispatch is used to call the server side implement for the method defined in the ksf file. withContext shows using context or not.
func (*StatF) Endpoints ¶ added in v1.4.38
Endpoints returns all active endpoint.Endpoint
func (*StatF) GetServant ¶ added in v1.4.38
GetServant gets servant for the service.
func (*StatF) KsfPingWithContext ¶ added in v1.4.38
KsfPingWithContext
func (*StatF) KsfSetProtocol ¶
KsfSetProtocol sets the protocol for the servant.
func (*StatF) KsfSetTimeout ¶
KsfSetTimeout sets the timeout for the servant which is in ms.
func (*StatF) ReportMicMsg ¶
func (obj *StatF) ReportMicMsg(msg map[StatMicMsgHead]StatMicMsgBody, bFromClient bool, opts ...map[string]string) (int32, error)
ReportMicMsg is the proxy function for the method defined in the ksf file, with the context
func (*StatF) ReportMicMsgOneWayWithContext ¶
func (obj *StatF) ReportMicMsgOneWayWithContext(ksfCtx context.Context, msg map[StatMicMsgHead]StatMicMsgBody, bFromClient bool, opts ...map[string]string) (ret int32, err error)
ReportMicMsgOneWayWithContext is the proxy function for the method defined in the ksf file, with the context
func (*StatF) ReportMicMsgWithContext ¶
func (obj *StatF) ReportMicMsgWithContext(ksfCtx context.Context, msg map[StatMicMsgHead]StatMicMsgBody, bFromClient bool, opts ...map[string]string) (ret int32, err error)
ReportMicMsgWithContext is the proxy function for the method defined in the ksf file, with the context
func (*StatF) ReportSampleMsg ¶
ReportSampleMsg is the proxy function for the method defined in the ksf file, with the context
func (*StatF) ReportSampleMsgOneWayWithContext ¶
func (obj *StatF) ReportSampleMsgOneWayWithContext(ksfCtx context.Context, msg []StatSampleMsg, opts ...map[string]string) (ret int32, err error)
ReportSampleMsgOneWayWithContext is the proxy function for the method defined in the ksf file, with the context
func (*StatF) ReportSampleMsgWithContext ¶
func (obj *StatF) ReportSampleMsgWithContext(ksfCtx context.Context, msg []StatSampleMsg, opts ...map[string]string) (ret int32, err error)
ReportSampleMsgWithContext is the proxy function for the method defined in the ksf file, with the context
func (*StatF) SetOnCloseCallback ¶ added in v1.4.38
SetOnCloseCallback
func (*StatF) SetOnConnectCallback ¶ added in v1.4.38
SetOnConnectCallback
func (*StatF) SetPushCallback ¶ added in v1.4.38
SetPushCallback
type StatFServant ¶
type StatFServant interface { ReportMicMsg(msg map[StatMicMsgHead]StatMicMsgBody, bFromClient bool) (ret int32, err error) ReportSampleMsg(msg []StatSampleMsg) (ret int32, err error) }
type StatFServantWithContext ¶
type StatFServantWithContext interface { ReportMicMsg(ksfCtx context.Context, msg map[StatMicMsgHead]StatMicMsgBody, bFromClient bool) (ret int32, err error) ReportSampleMsg(ksfCtx context.Context, msg []StatSampleMsg) (ret int32, err error) DoClose(ctx context.Context) }
type StatMicMsgBody ¶
type StatMicMsgBody struct { Count int32 `json:"count" ksf:"count,tag:0,require:true"` TimeoutCount int32 `json:"timeoutCount" ksf:"timeoutCount,tag:1,require:true"` ExecCount int32 `json:"execCount" ksf:"execCount,tag:2,require:true"` IntervalCount map[int32]int32 `json:"intervalCount" ksf:"intervalCount,tag:3,require:true"` TotalRspTime int64 `json:"totalRspTime" ksf:"totalRspTime,tag:4,require:true"` MaxRspTime int32 `json:"maxRspTime" ksf:"maxRspTime,tag:5,require:true"` MinRspTime int32 `json:"minRspTime" ksf:"minRspTime,tag:6,require:true"` }
StatMicMsgBody struct implement
func (*StatMicMsgBody) ReadBlock ¶
ReadBlock reads struct from the given tag , require or optional.
func (*StatMicMsgBody) ReadFrom ¶
func (st *StatMicMsgBody) ReadFrom(readBuf *codec.Reader) error
ReadFrom reads from readBuf and put into struct.
func (*StatMicMsgBody) ResetDefault ¶
func (st *StatMicMsgBody) ResetDefault()
func (*StatMicMsgBody) WriteBlock ¶
func (st *StatMicMsgBody) WriteBlock(buf *codec.Buffer, tag byte) error
WriteBlock encode struct
func (*StatMicMsgBody) WriteTo ¶
func (st *StatMicMsgBody) WriteTo(buf *codec.Buffer) (err error)
WriteTo encode struct to buffer
type StatMicMsgHead ¶
type StatMicMsgHead struct { MasterName string `json:"masterName" ksf:"masterName,tag:0,require:true"` SlaveName string `json:"slaveName" ksf:"slaveName,tag:1,require:true"` InterfaceName string `json:"interfaceName" ksf:"interfaceName,tag:2,require:true"` MasterIp string `json:"masterIp" ksf:"masterIp,tag:3,require:true"` SlaveIp string `json:"slaveIp" ksf:"slaveIp,tag:4,require:true"` SlavePort int32 `json:"slavePort" ksf:"slavePort,tag:5,require:true"` ReturnValue int32 `json:"returnValue" ksf:"returnValue,tag:6,require:true"` SlaveSetName string `json:"slaveSetName" ksf:"slaveSetName,tag:7,require:false"` SlaveSetArea string `json:"slaveSetArea" ksf:"slaveSetArea,tag:8,require:false"` SlaveSetID string `json:"slaveSetID" ksf:"slaveSetID,tag:9,require:false"` KsfVersion string `json:"ksfVersion" ksf:"ksfVersion,tag:10,require:false"` }
StatMicMsgHead struct implement
func (*StatMicMsgHead) ReadBlock ¶
ReadBlock reads struct from the given tag , require or optional.
func (*StatMicMsgHead) ReadFrom ¶
func (st *StatMicMsgHead) ReadFrom(readBuf *codec.Reader) error
ReadFrom reads from readBuf and put into struct.
func (*StatMicMsgHead) ResetDefault ¶
func (st *StatMicMsgHead) ResetDefault()
func (*StatMicMsgHead) WriteBlock ¶
func (st *StatMicMsgHead) WriteBlock(buf *codec.Buffer, tag byte) error
WriteBlock encode struct
func (*StatMicMsgHead) WriteTo ¶
func (st *StatMicMsgHead) WriteTo(buf *codec.Buffer) (err error)
WriteTo encode struct to buffer
type StatSampleMsg ¶
type StatSampleMsg struct { Unid string `json:"unid" ksf:"unid,tag:0,require:true"` MasterName string `json:"masterName" ksf:"masterName,tag:1,require:true"` SlaveName string `json:"slaveName" ksf:"slaveName,tag:2,require:true"` InterfaceName string `json:"interfaceName" ksf:"interfaceName,tag:3,require:true"` MasterIp string `json:"masterIp" ksf:"masterIp,tag:4,require:true"` SlaveIp string `json:"slaveIp" ksf:"slaveIp,tag:5,require:true"` Depth int32 `json:"depth" ksf:"depth,tag:6,require:true"` Width int32 `json:"width" ksf:"width,tag:7,require:true"` ParentWidth int32 `json:"parentWidth" ksf:"parentWidth,tag:8,require:true"` }
StatSampleMsg struct implement
func (*StatSampleMsg) ReadBlock ¶
ReadBlock reads struct from the given tag , require or optional.
func (*StatSampleMsg) ReadFrom ¶
func (st *StatSampleMsg) ReadFrom(readBuf *codec.Reader) error
ReadFrom reads from readBuf and put into struct.
func (*StatSampleMsg) ResetDefault ¶
func (st *StatSampleMsg) ResetDefault()
func (*StatSampleMsg) WriteBlock ¶
func (st *StatSampleMsg) WriteBlock(buf *codec.Buffer, tag byte) error
WriteBlock encode struct
func (*StatSampleMsg) WriteTo ¶
func (st *StatSampleMsg) WriteTo(buf *codec.Buffer) (err error)
WriteTo encode struct to buffer