Documentation ¶
Overview ¶
Code generated by tars2go 1.2.3, DO NOT EDIT. This file was generated from NotifyF.tars Package notifyf comment
Code generated by tars2go 1.2.3, DO NOT EDIT. This file was generated from NotifyF.tars Package notifyf comment
Index ¶
- type NOTIFYLEVEL
- type Notify
- func (obj *Notify) Dispatch(tarsCtx context.Context, val interface{}, tarsReq *requestf.RequestPacket, ...) (err error)
- func (obj *Notify) Endpoints() []*endpoint.Endpoint
- func (obj *Notify) ReportNotifyInfo(info *ReportInfo, opts ...map[string]string) error
- func (obj *Notify) ReportNotifyInfoOneWayWithContext(tarsCtx context.Context, info *ReportInfo, opts ...map[string]string) (err error)
- func (obj *Notify) ReportNotifyInfoWithContext(tarsCtx context.Context, info *ReportInfo, opts ...map[string]string) (err error)
- func (obj *Notify) SetServant(servant model.Servant)
- func (obj *Notify) TarsSetProtocol(p model.Protocol)
- func (obj *Notify) TarsSetTimeout(timeout int)
- 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) Dispatch ¶
func (obj *Notify) Dispatch(tarsCtx context.Context, val interface{}, tarsReq *requestf.RequestPacket, tarsResp *requestf.ResponsePacket, withContext bool) (err error)
Dispatch is used to call the server side implement for the method defined in the tars file. withContext shows using context or not.
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 tars file, with the context
func (*Notify) ReportNotifyInfoOneWayWithContext ¶ added in v1.2.0
func (obj *Notify) ReportNotifyInfoOneWayWithContext(tarsCtx context.Context, info *ReportInfo, opts ...map[string]string) (err error)
ReportNotifyInfoOneWayWithContext is the proxy function for the method defined in the tars file, with the context
func (*Notify) ReportNotifyInfoWithContext ¶
func (obj *Notify) ReportNotifyInfoWithContext(tarsCtx context.Context, info *ReportInfo, opts ...map[string]string) (err error)
ReportNotifyInfoWithContext is the proxy function for the method defined in the tars file, with the context
func (*Notify) SetServant ¶
SetServant sets servant for the service.
func (*Notify) TarsSetProtocol ¶ added in v1.2.0
TarsSetProtocol sets the protocol for the servant.
func (*Notify) TarsSetTimeout ¶
TarsSetTimeout sets the timeout for the servant which is in ms.
type NotifyServant ¶ added in v1.3.0
type NotifyServant interface {
ReportNotifyInfo(info *ReportInfo) (err error)
}
type NotifyServantWithContext ¶ added in v1.3.0
type NotifyServantWithContext interface {
ReportNotifyInfo(tarsCtx context.Context, info *ReportInfo) (err error)
}
type ReportInfo ¶
type ReportInfo struct { EType ReportType `json:"eType" tars:"eType,tag:1,require:true"` SApp string `json:"sApp" tars:"sApp,tag:2,require:true"` SSet string `json:"sSet" tars:"sSet,tag:3,require:true"` SContainer string `json:"sContainer" tars:"sContainer,tag:4,require:true"` SServer string `json:"sServer" tars:"sServer,tag:5,require:true"` SMessage string `json:"sMessage" tars:"sMessage,tag:6,require:true"` SThreadId string `json:"sThreadId" tars:"sThreadId,tag:7,require:false"` ELevel NOTIFYLEVEL `json:"eLevel" tars:"eLevel,tag:8,require:false"` SNodeName string `json:"sNodeName" tars:"sNodeName,tag:9,require:false"` }
ReportInfo struct implement
func (*ReportInfo) ReadFrom ¶
func (st *ReportInfo) ReadFrom(readBuf *codec.Reader) error
ReadFrom reads from readBuf and put into struct.
func (*ReportInfo) ResetDefault ¶ added in v1.2.0
func (st *ReportInfo) ResetDefault()
func (*ReportInfo) WriteBlock ¶
func (st *ReportInfo) WriteBlock(buf *codec.Buffer, tag byte) error
WriteBlock encode struct
type ReportType ¶
type ReportType int32
const ( ReportType_REPORT ReportType = 0 ReportType_NOTIFY ReportType = 1 )