notifyf

package
v1.3.24 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package notifyf comment This file was generated by ksf2go 1.1.7 Generated from NotifyF.ksf

Package notifyf comment This file was generated by ksf2go 1.1.7 Generated from NotifyF.ksf

Index

Constants

View Source
const (
	NOTIFYLEVEL_NOTIFYNORMAL = 0
	NOTIFYLEVEL_NOTIFYWARN   = 1
	NOTIFYLEVEL_NOTIFYERROR  = 2
)
View Source
const (
	ReportType_REPORT = 0
	ReportType_NOTIFY = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NOTIFYLEVEL

type NOTIFYLEVEL int32

type Notify

type Notify struct {
	// contains filtered or unexported fields
}

Notify struct

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) GetNotifyInfo

func (obj *Notify) GetNotifyInfo(stKey *NotifyKey, stInfo *NotifyInfo, opts ...map[string]string) (ret int32, err 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) KsfSetProtocol

func (obj *Notify) KsfSetProtocol(p m.Protocol)

KsfSetProtocol sets the protocol for the servant.

func (*Notify) KsfSetTimeout

func (obj *Notify) KsfSetTimeout(timeout int)

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) (err 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) (err 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) (err 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) SetServant

func (obj *Notify) SetServant(servant m.Servant)

SetServant sets servant for the service.

type NotifyInfo

type NotifyInfo struct {
	Nextpage    int32        `json:"nextpage"`
	NotifyItems []NotifyItem `json:"notifyItems"`
}

NotifyInfo struct implement

func (*NotifyInfo) ReadBlock

func (st *NotifyInfo) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error

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"`
	SServerId  string `json:"sServerId"`
	ILevel     int32  `json:"iLevel"`
	SMessage   string `json:"sMessage"`
}

NotifyItem struct implement

func (*NotifyItem) ReadBlock

func (st *NotifyItem) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error

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"`
	Ip   string `json:"ip"`
	Page int32  `json:"page"`
}

NotifyKey struct implement

func (*NotifyKey) ReadBlock

func (st *NotifyKey) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error

ReadBlock reads struct from the given tag , require or optional.

func (*NotifyKey) ReadFrom

func (st *NotifyKey) ReadFrom(readBuf *codec.Reader) error

ReadFrom reads from readBuf and put into struct.

func (*NotifyKey) ResetDefault

func (st *NotifyKey) ResetDefault()

func (*NotifyKey) WriteBlock

func (st *NotifyKey) WriteBlock(buf *codec.Buffer, tag byte) error

WriteBlock encode struct

func (*NotifyKey) WriteTo

func (st *NotifyKey) WriteTo(buf *codec.Buffer) (err error)

WriteTo encode struct to buffer

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)
}

type ReportInfo

type ReportInfo struct {
	EType      ReportType  `json:"eType"`
	SApp       string      `json:"sApp"`
	SSet       string      `json:"sSet"`
	SContainer string      `json:"sContainer"`
	SServer    string      `json:"sServer"`
	SMessage   string      `json:"sMessage"`
	SThreadId  string      `json:"sThreadId"`
	ELevel     NOTIFYLEVEL `json:"eLevel"`
}

ReportInfo struct implement

func (*ReportInfo) ReadBlock

func (st *ReportInfo) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error

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

Jump to

Keyboard shortcuts

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