Documentation
¶
Overview ¶
Code generated by ksf2go 1.3.22, DO NOT EDIT. This file was generated from /home/cc/workspace/KsfGo/ksf/protocol/res/NotifyF.ksf Package notifyf comment
Code generated by ksf2go 1.3.22, DO NOT EDIT. This file was generated from /home/cc/workspace/KsfGo/ksf/protocol/res/NotifyF.ksf Package notifyf comment
Index ¶
- type NOTIFYLEVEL
- type Notify
- func (obj *Notify) AllEndpoints() (active []*endpoint.Endpoint, inactive []*endpoint.Endpoint)
- func (obj *Notify) Dispatch(ksfCtx context.Context, val interface{}, ksfReq *requestf.RequestPacket, ...) (err error)
- func (obj *Notify) Endpoints() (active []*endpoint.Endpoint)
- func (obj *Notify) GetNotifyInfo(stKey *NotifyKey, stInfo *NotifyInfo, opts ...map[string]string) (int32, error)
- func (obj *Notify) GetNotifyInfoOneWayWithContext(ksfCtx context.Context, stKey *NotifyKey, stInfo *NotifyInfo, ...) (ret int32, err error)
- func (obj *Notify) GetNotifyInfoWithContext(ksfCtx context.Context, stKey *NotifyKey, stInfo *NotifyInfo, ...) (ret int32, err error)
- func (obj *Notify) GetServant() (servant *model.Servant)
- func (obj *Notify) KsfPing()
- func (obj *Notify) KsfPingWithContext(ksfCtx context.Context)
- func (obj *Notify) KsfSetProtocol(p model.Protocol)
- func (obj *Notify) KsfSetTimeout(timeout int)
- func (obj *Notify) NotifyServer(sServerName string, level NOTIFYLEVEL, sMessage string, ...) error
- func (obj *Notify) NotifyServerOneWayWithContext(ksfCtx context.Context, sServerName string, level NOTIFYLEVEL, sMessage string, ...) (err error)
- func (obj *Notify) NotifyServerWithContext(ksfCtx context.Context, sServerName string, level NOTIFYLEVEL, sMessage string, ...) (err error)
- func (obj *Notify) ReportNotifyInfo(info *ReportInfo, opts ...map[string]string) error
- func (obj *Notify) ReportNotifyInfoOneWayWithContext(ksfCtx context.Context, info *ReportInfo, opts ...map[string]string) (err error)
- func (obj *Notify) ReportNotifyInfoWithContext(ksfCtx context.Context, info *ReportInfo, opts ...map[string]string) (err error)
- func (obj *Notify) ReportServer(sServerName string, sThreadId string, sMessage string, ...) error
- func (obj *Notify) ReportServerOneWayWithContext(ksfCtx context.Context, sServerName string, sThreadId string, sMessage string, ...) (err error)
- func (obj *Notify) ReportServerWithContext(ksfCtx context.Context, sServerName string, sThreadId string, sMessage string, ...) (err error)
- func (obj *Notify) SetOnCloseCallback(callback func(string))
- func (obj *Notify) SetOnConnectCallback(callback func(string))
- func (obj *Notify) SetPushCallback(callback func([]byte))
- func (obj *Notify) SetServant(servant model.Servant)
- type NotifyInfo
- func (st *NotifyInfo) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error
- func (st *NotifyInfo) ReadFrom(readBuf *codec.Reader) error
- func (st *NotifyInfo) ResetDefault()
- func (st *NotifyInfo) WriteBlock(buf *codec.Buffer, tag byte) error
- func (st *NotifyInfo) WriteTo(buf *codec.Buffer) (err error)
- type NotifyItem
- func (st *NotifyItem) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error
- func (st *NotifyItem) ReadFrom(readBuf *codec.Reader) error
- func (st *NotifyItem) ResetDefault()
- func (st *NotifyItem) WriteBlock(buf *codec.Buffer, tag byte) error
- func (st *NotifyItem) WriteTo(buf *codec.Buffer) (err error)
- type NotifyKey
- func (st *NotifyKey) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error
- func (st *NotifyKey) ReadFrom(readBuf *codec.Reader) error
- func (st *NotifyKey) ResetDefault()
- func (st *NotifyKey) WriteBlock(buf *codec.Buffer, tag byte) error
- func (st *NotifyKey) WriteTo(buf *codec.Buffer) (err error)
- type NotifyServant
- type NotifyServantWithContext
- type ReportInfo
- func (st *ReportInfo) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error
- func (st *ReportInfo) ReadFrom(readBuf *codec.Reader) error
- func (st *ReportInfo) ResetDefault()
- func (st *ReportInfo) WriteBlock(buf *codec.Buffer, tag byte) error
- func (st *ReportInfo) WriteTo(buf *codec.Buffer) (err error)
- type ReportType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NOTIFYLEVEL ¶
type NOTIFYLEVEL int32
const ( NOTIFYLEVEL_NOTIFYNORMAL NOTIFYLEVEL = 0 NOTIFYLEVEL_NOTIFYWARN NOTIFYLEVEL = 1 NOTIFYLEVEL_NOTIFYERROR NOTIFYLEVEL = 2 )
type Notify ¶
type Notify struct {
// contains filtered or unexported fields
}
Notify struct
func (*Notify) AllEndpoints ¶ added in v1.4.39
Endpoints returns all endpoint.Endpoint
func (*Notify) Dispatch ¶
func (obj *Notify) 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 (*Notify) Endpoints ¶ added in v1.4.38
Endpoints returns all active endpoint.Endpoint
func (*Notify) GetNotifyInfo ¶
func (obj *Notify) GetNotifyInfo(stKey *NotifyKey, stInfo *NotifyInfo, opts ...map[string]string) (int32, error)
GetNotifyInfo is the proxy function for the method defined in the ksf file, with the context
func (*Notify) GetNotifyInfoOneWayWithContext ¶
func (obj *Notify) GetNotifyInfoOneWayWithContext(ksfCtx context.Context, stKey *NotifyKey, stInfo *NotifyInfo, opts ...map[string]string) (ret int32, err error)
GetNotifyInfoOneWayWithContext is the proxy function for the method defined in the ksf file, with the context
func (*Notify) GetNotifyInfoWithContext ¶
func (obj *Notify) GetNotifyInfoWithContext(ksfCtx context.Context, stKey *NotifyKey, stInfo *NotifyInfo, opts ...map[string]string) (ret int32, err error)
GetNotifyInfoWithContext is the proxy function for the method defined in the ksf file, with the context
func (*Notify) GetServant ¶ added in v1.4.38
GetServant gets servant for the service.
func (*Notify) KsfPingWithContext ¶ added in v1.4.38
KsfPingWithContext
func (*Notify) KsfSetProtocol ¶
KsfSetProtocol sets the protocol for the servant.
func (*Notify) KsfSetTimeout ¶
KsfSetTimeout sets the timeout for the servant which is in ms.
func (*Notify) NotifyServer ¶
func (obj *Notify) NotifyServer(sServerName string, level NOTIFYLEVEL, sMessage string, opts ...map[string]string) error
NotifyServer is the proxy function for the method defined in the ksf file, with the context
func (*Notify) NotifyServerOneWayWithContext ¶
func (obj *Notify) NotifyServerOneWayWithContext(ksfCtx context.Context, sServerName string, level NOTIFYLEVEL, sMessage string, opts ...map[string]string) (err error)
NotifyServerOneWayWithContext is the proxy function for the method defined in the ksf file, with the context
func (*Notify) NotifyServerWithContext ¶
func (obj *Notify) NotifyServerWithContext(ksfCtx context.Context, sServerName string, level NOTIFYLEVEL, sMessage string, opts ...map[string]string) (err error)
NotifyServerWithContext is the proxy function for the method defined in the ksf file, with the context
func (*Notify) ReportNotifyInfo ¶
func (obj *Notify) ReportNotifyInfo(info *ReportInfo, opts ...map[string]string) error
ReportNotifyInfo is the proxy function for the method defined in the ksf file, with the context
func (*Notify) ReportNotifyInfoOneWayWithContext ¶
func (obj *Notify) ReportNotifyInfoOneWayWithContext(ksfCtx context.Context, info *ReportInfo, opts ...map[string]string) (err error)
ReportNotifyInfoOneWayWithContext is the proxy function for the method defined in the ksf file, with the context
func (*Notify) ReportNotifyInfoWithContext ¶
func (obj *Notify) ReportNotifyInfoWithContext(ksfCtx context.Context, info *ReportInfo, opts ...map[string]string) (err error)
ReportNotifyInfoWithContext is the proxy function for the method defined in the ksf file, with the context
func (*Notify) ReportServer ¶
func (obj *Notify) ReportServer(sServerName string, sThreadId string, sMessage string, opts ...map[string]string) error
ReportServer is the proxy function for the method defined in the ksf file, with the context
func (*Notify) ReportServerOneWayWithContext ¶
func (obj *Notify) ReportServerOneWayWithContext(ksfCtx context.Context, sServerName string, sThreadId string, sMessage string, opts ...map[string]string) (err error)
ReportServerOneWayWithContext is the proxy function for the method defined in the ksf file, with the context
func (*Notify) ReportServerWithContext ¶
func (obj *Notify) ReportServerWithContext(ksfCtx context.Context, sServerName string, sThreadId string, sMessage string, opts ...map[string]string) (err error)
ReportServerWithContext is the proxy function for the method defined in the ksf file, with the context
func (*Notify) SetOnCloseCallback ¶ added in v1.4.38
SetOnCloseCallback
func (*Notify) SetOnConnectCallback ¶ added in v1.4.38
SetOnConnectCallback
func (*Notify) SetPushCallback ¶ added in v1.4.38
SetPushCallback
type NotifyInfo ¶
type NotifyInfo struct { Nextpage int32 `json:"nextpage" ksf:"nextpage,tag:1,require:true"` NotifyItems []NotifyItem `json:"notifyItems" ksf:"notifyItems,tag:2,require:true"` }
NotifyInfo struct implement
func (*NotifyInfo) ReadBlock ¶
ReadBlock reads struct from the given tag , require or optional.
func (*NotifyInfo) ReadFrom ¶
func (st *NotifyInfo) ReadFrom(readBuf *codec.Reader) error
ReadFrom reads from readBuf and put into struct.
func (*NotifyInfo) ResetDefault ¶
func (st *NotifyInfo) ResetDefault()
func (*NotifyInfo) WriteBlock ¶
func (st *NotifyInfo) WriteBlock(buf *codec.Buffer, tag byte) error
WriteBlock encode struct
func (*NotifyInfo) WriteTo ¶
func (st *NotifyInfo) WriteTo(buf *codec.Buffer) (err error)
WriteTo encode struct to buffer
type NotifyItem ¶
type NotifyItem struct { STimeStamp string `json:"sTimeStamp" ksf:"sTimeStamp,tag:1,require:true"` SServerId string `json:"sServerId" ksf:"sServerId,tag:2,require:true"` ILevel int32 `json:"iLevel" ksf:"iLevel,tag:3,require:true"` SMessage string `json:"sMessage" ksf:"sMessage,tag:4,require:true"` }
NotifyItem struct implement
func (*NotifyItem) ReadBlock ¶
ReadBlock reads struct from the given tag , require or optional.
func (*NotifyItem) ReadFrom ¶
func (st *NotifyItem) ReadFrom(readBuf *codec.Reader) error
ReadFrom reads from readBuf and put into struct.
func (*NotifyItem) ResetDefault ¶
func (st *NotifyItem) ResetDefault()
func (*NotifyItem) WriteBlock ¶
func (st *NotifyItem) WriteBlock(buf *codec.Buffer, tag byte) error
WriteBlock encode struct
func (*NotifyItem) WriteTo ¶
func (st *NotifyItem) WriteTo(buf *codec.Buffer) (err error)
WriteTo encode struct to buffer
type NotifyKey ¶
type NotifyKey struct { Name string `json:"name" ksf:"name,tag:1,require:true"` Ip string `json:"ip" ksf:"ip,tag:2,require:true"` Page int32 `json:"page" ksf:"page,tag:3,require:true"` }
NotifyKey struct implement
func (*NotifyKey) ReadBlock ¶
ReadBlock reads struct from the given tag , require or optional.
func (*NotifyKey) ReadFrom ¶
ReadFrom reads from readBuf and put into struct.
func (*NotifyKey) WriteBlock ¶
WriteBlock encode struct
type NotifyServant ¶
type NotifyServant interface { ReportServer(sServerName string, sThreadId string, sMessage string) (err error) NotifyServer(sServerName string, level NOTIFYLEVEL, sMessage string) (err error) GetNotifyInfo(stKey *NotifyKey, stInfo *NotifyInfo) (ret int32, err error) ReportNotifyInfo(info *ReportInfo) (err error) }
type NotifyServantWithContext ¶
type NotifyServantWithContext interface { ReportServer(ksfCtx context.Context, sServerName string, sThreadId string, sMessage string) (err error) NotifyServer(ksfCtx context.Context, sServerName string, level NOTIFYLEVEL, sMessage string) (err error) GetNotifyInfo(ksfCtx context.Context, stKey *NotifyKey, stInfo *NotifyInfo) (ret int32, err error) ReportNotifyInfo(ksfCtx context.Context, info *ReportInfo) (err error) DoClose(ctx context.Context) }
type ReportInfo ¶
type ReportInfo struct { EType ReportType `json:"eType" ksf:"eType,tag:1,require:true"` SApp string `json:"sApp" ksf:"sApp,tag:2,require:true"` SSet string `json:"sSet" ksf:"sSet,tag:3,require:true"` SContainer string `json:"sContainer" ksf:"sContainer,tag:4,require:true"` SServer string `json:"sServer" ksf:"sServer,tag:5,require:true"` SMessage string `json:"sMessage" ksf:"sMessage,tag:6,require:true"` SThreadId string `json:"sThreadId" ksf:"sThreadId,tag:7,require:false"` ELevel NOTIFYLEVEL `json:"eLevel" ksf:"eLevel,tag:8,require:false"` }
ReportInfo struct implement
func (*ReportInfo) ReadBlock ¶
ReadBlock reads struct from the given tag , require or optional.
func (*ReportInfo) ReadFrom ¶
func (st *ReportInfo) ReadFrom(readBuf *codec.Reader) error
ReadFrom reads from readBuf and put into struct.
func (*ReportInfo) ResetDefault ¶
func (st *ReportInfo) ResetDefault()
func (*ReportInfo) WriteBlock ¶
func (st *ReportInfo) WriteBlock(buf *codec.Buffer, tag byte) error
WriteBlock encode struct
func (*ReportInfo) WriteTo ¶
func (st *ReportInfo) WriteTo(buf *codec.Buffer) (err error)
WriteTo encode struct to buffer
type ReportType ¶
type ReportType int32
const ( ReportType_REPORT ReportType = 0 ReportType_NOTIFY ReportType = 1 )