Documentation ¶
Overview ¶
Code generated by ksf2go 1.3.21, DO NOT EDIT. This file was generated from PropertyF.ksf Package propertyf comment
Code generated by ksf2go 1.3.21, DO NOT EDIT. This file was generated from PropertyF.ksf Package propertyf comment
Index ¶
- type PropertyF
- func (obj *PropertyF) Dispatch(ksfCtx context.Context, val interface{}, ksfReq *requestf.RequestPacket, ...) (err error)
- func (obj *PropertyF) Endpoints() []*endpoint.Endpoint
- func (obj *PropertyF) GetServant() (servant *model.Servant)
- func (obj *PropertyF) KsfPing()
- func (obj *PropertyF) KsfPingWithContext(ksfCtx context.Context)
- func (obj *PropertyF) KsfSetProtocol(p model.Protocol)
- func (obj *PropertyF) KsfSetTimeout(timeout int)
- func (obj *PropertyF) ReportPropMsg(statmsg map[StatPropMsgHead]StatPropMsgBody, opts ...map[string]string) (int32, error)
- func (obj *PropertyF) ReportPropMsgOneWayWithContext(ksfCtx context.Context, statmsg map[StatPropMsgHead]StatPropMsgBody, ...) (ret int32, err error)
- func (obj *PropertyF) ReportPropMsgWithContext(ksfCtx context.Context, statmsg map[StatPropMsgHead]StatPropMsgBody, ...) (ret int32, err error)
- func (obj *PropertyF) SetOnCloseCallback(callback func(string))
- func (obj *PropertyF) SetOnConnectCallback(callback func(string))
- func (obj *PropertyF) SetPushCallback(callback func([]byte))
- func (obj *PropertyF) SetServant(servant model.Servant)
- type PropertyFServant
- type PropertyFServantWithContext
- type StatPropInfo
- func (st *StatPropInfo) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error
- func (st *StatPropInfo) ReadFrom(readBuf *codec.Reader) error
- func (st *StatPropInfo) ResetDefault()
- func (st *StatPropInfo) WriteBlock(buf *codec.Buffer, tag byte) error
- func (st *StatPropInfo) WriteTo(buf *codec.Buffer) (err error)
- type StatPropMsgBody
- func (st *StatPropMsgBody) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error
- func (st *StatPropMsgBody) ReadFrom(readBuf *codec.Reader) error
- func (st *StatPropMsgBody) ResetDefault()
- func (st *StatPropMsgBody) WriteBlock(buf *codec.Buffer, tag byte) error
- func (st *StatPropMsgBody) WriteTo(buf *codec.Buffer) (err error)
- type StatPropMsgHead
- func (st *StatPropMsgHead) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error
- func (st *StatPropMsgHead) ReadFrom(readBuf *codec.Reader) error
- func (st *StatPropMsgHead) ResetDefault()
- func (st *StatPropMsgHead) WriteBlock(buf *codec.Buffer, tag byte) error
- func (st *StatPropMsgHead) WriteTo(buf *codec.Buffer) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PropertyF ¶
type PropertyF struct {
// contains filtered or unexported fields
}
PropertyF struct
func NewPropertyF ¶ added in v1.4.38
func NewPropertyF() *PropertyF
NewPropertyF creates a new PropertyF servant.
func (*PropertyF) Dispatch ¶
func (obj *PropertyF) 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 (*PropertyF) Endpoints ¶ added in v1.4.38
Endpoints returns all active endpoint.Endpoint
func (*PropertyF) GetServant ¶ added in v1.4.38
GetServant gets servant for the service.
func (*PropertyF) KsfPingWithContext ¶ added in v1.4.38
KsfPingWithContext
func (*PropertyF) KsfSetProtocol ¶
KsfSetProtocol sets the protocol for the servant.
func (*PropertyF) KsfSetTimeout ¶
KsfSetTimeout sets the timeout for the servant which is in ms.
func (*PropertyF) ReportPropMsg ¶
func (obj *PropertyF) ReportPropMsg(statmsg map[StatPropMsgHead]StatPropMsgBody, opts ...map[string]string) (int32, error)
ReportPropMsg is the proxy function for the method defined in the ksf file, with the context
func (*PropertyF) ReportPropMsgOneWayWithContext ¶
func (obj *PropertyF) ReportPropMsgOneWayWithContext(ksfCtx context.Context, statmsg map[StatPropMsgHead]StatPropMsgBody, opts ...map[string]string) (ret int32, err error)
ReportPropMsgOneWayWithContext is the proxy function for the method defined in the ksf file, with the context
func (*PropertyF) ReportPropMsgWithContext ¶
func (obj *PropertyF) ReportPropMsgWithContext(ksfCtx context.Context, statmsg map[StatPropMsgHead]StatPropMsgBody, opts ...map[string]string) (ret int32, err error)
ReportPropMsgWithContext is the proxy function for the method defined in the ksf file, with the context
func (*PropertyF) SetOnCloseCallback ¶ added in v1.4.38
SetOnCloseCallback
func (*PropertyF) SetOnConnectCallback ¶ added in v1.4.38
SetOnConnectCallback
func (*PropertyF) SetPushCallback ¶ added in v1.4.38
SetPushCallback
type PropertyFServant ¶
type PropertyFServant interface {
ReportPropMsg(statmsg map[StatPropMsgHead]StatPropMsgBody) (ret int32, err error)
}
type PropertyFServantWithContext ¶
type PropertyFServantWithContext interface { ReportPropMsg(ksfCtx context.Context, statmsg map[StatPropMsgHead]StatPropMsgBody) (ret int32, err error) DoClose(ctx context.Context) }
type StatPropInfo ¶
type StatPropInfo struct { Policy string `json:"policy" ksf:"policy,tag:0,require:true"` Value string `json:"value" ksf:"value,tag:1,require:true"` }
StatPropInfo struct implement
func (*StatPropInfo) ReadBlock ¶
ReadBlock reads struct from the given tag , require or optional.
func (*StatPropInfo) ReadFrom ¶
func (st *StatPropInfo) ReadFrom(readBuf *codec.Reader) error
ReadFrom reads from readBuf and put into struct.
func (*StatPropInfo) ResetDefault ¶
func (st *StatPropInfo) ResetDefault()
func (*StatPropInfo) WriteBlock ¶
func (st *StatPropInfo) WriteBlock(buf *codec.Buffer, tag byte) error
WriteBlock encode struct
func (*StatPropInfo) WriteTo ¶
func (st *StatPropInfo) WriteTo(buf *codec.Buffer) (err error)
WriteTo encode struct to buffer
type StatPropMsgBody ¶
type StatPropMsgBody struct {
VInfo []StatPropInfo `json:"vInfo" ksf:"vInfo,tag:0,require:true"`
}
StatPropMsgBody struct implement
func (*StatPropMsgBody) ReadBlock ¶
ReadBlock reads struct from the given tag , require or optional.
func (*StatPropMsgBody) ReadFrom ¶
func (st *StatPropMsgBody) ReadFrom(readBuf *codec.Reader) error
ReadFrom reads from readBuf and put into struct.
func (*StatPropMsgBody) ResetDefault ¶
func (st *StatPropMsgBody) ResetDefault()
func (*StatPropMsgBody) WriteBlock ¶
func (st *StatPropMsgBody) WriteBlock(buf *codec.Buffer, tag byte) error
WriteBlock encode struct
func (*StatPropMsgBody) WriteTo ¶
func (st *StatPropMsgBody) WriteTo(buf *codec.Buffer) (err error)
WriteTo encode struct to buffer
type StatPropMsgHead ¶
type StatPropMsgHead struct { ModuleName string `json:"moduleName" ksf:"moduleName,tag:0,require:true"` Ip string `json:"ip" ksf:"ip,tag:1,require:true"` PropertyName string `json:"propertyName" ksf:"propertyName,tag:2,require:true"` SetName string `json:"setName" ksf:"setName,tag:3,require:false"` SetArea string `json:"setArea" ksf:"setArea,tag:4,require:false"` SetID string `json:"setID" ksf:"setID,tag:5,require:false"` SContainer string `json:"sContainer" ksf:"sContainer,tag:6,require:false"` IPropertyVer int32 `json:"iPropertyVer" ksf:"iPropertyVer,tag:7,require:false"` }
StatPropMsgHead struct implement
func (*StatPropMsgHead) ReadBlock ¶
ReadBlock reads struct from the given tag , require or optional.
func (*StatPropMsgHead) ReadFrom ¶
func (st *StatPropMsgHead) ReadFrom(readBuf *codec.Reader) error
ReadFrom reads from readBuf and put into struct.
func (*StatPropMsgHead) ResetDefault ¶
func (st *StatPropMsgHead) ResetDefault()
func (*StatPropMsgHead) WriteBlock ¶
func (st *StatPropMsgHead) WriteBlock(buf *codec.Buffer, tag byte) error
WriteBlock encode struct
func (*StatPropMsgHead) WriteTo ¶
func (st *StatPropMsgHead) WriteTo(buf *codec.Buffer) (err error)
WriteTo encode struct to buffer