Documentation ¶
Overview ¶
Code generated by tars2go 1.2.3, DO NOT EDIT. This file was generated from NodeF.tars Package nodef comment
Code generated by tars2go 1.2.3, DO NOT EDIT. This file was generated from NodeF.tars Package nodef comment
Index ¶
- type ServerF
- func (obj *ServerF) Dispatch(tarsCtx context.Context, val interface{}, tarsReq *requestf.RequestPacket, ...) (err error)
- func (obj *ServerF) Endpoints() []*endpoint.Endpoint
- func (obj *ServerF) GetLatestKeepAliveTime(opts ...map[string]string) (uint32, error)
- func (obj *ServerF) GetLatestKeepAliveTimeOneWayWithContext(tarsCtx context.Context, opts ...map[string]string) (ret uint32, err error)
- func (obj *ServerF) GetLatestKeepAliveTimeWithContext(tarsCtx context.Context, opts ...map[string]string) (ret uint32, err error)
- func (obj *ServerF) KeepActiving(serverInfo *ServerInfo, opts ...map[string]string) (int32, error)
- func (obj *ServerF) KeepActivingOneWayWithContext(tarsCtx context.Context, serverInfo *ServerInfo, opts ...map[string]string) (ret int32, err error)
- func (obj *ServerF) KeepActivingWithContext(tarsCtx context.Context, serverInfo *ServerInfo, opts ...map[string]string) (ret int32, err error)
- func (obj *ServerF) KeepAlive(serverInfo *ServerInfo, opts ...map[string]string) (int32, error)
- func (obj *ServerF) KeepAliveOneWayWithContext(tarsCtx context.Context, serverInfo *ServerInfo, opts ...map[string]string) (ret int32, err error)
- func (obj *ServerF) KeepAliveWithContext(tarsCtx context.Context, serverInfo *ServerInfo, opts ...map[string]string) (ret int32, err error)
- func (obj *ServerF) ReportVersion(app string, serverName string, version string, opts ...map[string]string) (int32, error)
- func (obj *ServerF) ReportVersionOneWayWithContext(tarsCtx context.Context, app string, serverName string, version string, ...) (ret int32, err error)
- func (obj *ServerF) ReportVersionWithContext(tarsCtx context.Context, app string, serverName string, version string, ...) (ret int32, err error)
- func (obj *ServerF) SetServant(servant model.Servant)
- func (obj *ServerF) TarsSetProtocol(p model.Protocol)
- func (obj *ServerF) TarsSetTimeout(timeout int)
- type ServerFServant
- type ServerFServantWithContext
- type ServerInfo
- func (st *ServerInfo) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error
- func (st *ServerInfo) ReadFrom(readBuf *codec.Reader) error
- func (st *ServerInfo) ResetDefault()
- func (st *ServerInfo) WriteBlock(buf *codec.Buffer, tag byte) error
- func (st *ServerInfo) WriteTo(buf *codec.Buffer) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServerF ¶
type ServerF struct {
// contains filtered or unexported fields
}
ServerF struct
func NewServerF ¶ added in v1.4.5
func NewServerF() *ServerF
NewServerF creates a new ServerF servant.
func (*ServerF) Dispatch ¶
func (obj *ServerF) 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 (*ServerF) GetLatestKeepAliveTime ¶ added in v1.4.5
GetLatestKeepAliveTime is the proxy function for the method defined in the tars file, with the context
func (*ServerF) GetLatestKeepAliveTimeOneWayWithContext ¶ added in v1.4.5
func (obj *ServerF) GetLatestKeepAliveTimeOneWayWithContext(tarsCtx context.Context, opts ...map[string]string) (ret uint32, err error)
GetLatestKeepAliveTimeOneWayWithContext is the proxy function for the method defined in the tars file, with the context
func (*ServerF) GetLatestKeepAliveTimeWithContext ¶ added in v1.4.5
func (obj *ServerF) GetLatestKeepAliveTimeWithContext(tarsCtx context.Context, opts ...map[string]string) (ret uint32, err error)
GetLatestKeepAliveTimeWithContext is the proxy function for the method defined in the tars file, with the context
func (*ServerF) KeepActiving ¶ added in v1.4.5
KeepActiving is the proxy function for the method defined in the tars file, with the context
func (*ServerF) KeepActivingOneWayWithContext ¶ added in v1.4.5
func (obj *ServerF) KeepActivingOneWayWithContext(tarsCtx context.Context, serverInfo *ServerInfo, opts ...map[string]string) (ret int32, err error)
KeepActivingOneWayWithContext is the proxy function for the method defined in the tars file, with the context
func (*ServerF) KeepActivingWithContext ¶ added in v1.4.5
func (obj *ServerF) KeepActivingWithContext(tarsCtx context.Context, serverInfo *ServerInfo, opts ...map[string]string) (ret int32, err error)
KeepActivingWithContext is the proxy function for the method defined in the tars file, with the context
func (*ServerF) KeepAlive ¶
KeepAlive is the proxy function for the method defined in the tars file, with the context
func (*ServerF) KeepAliveOneWayWithContext ¶ added in v1.2.0
func (obj *ServerF) KeepAliveOneWayWithContext(tarsCtx context.Context, serverInfo *ServerInfo, opts ...map[string]string) (ret int32, err error)
KeepAliveOneWayWithContext is the proxy function for the method defined in the tars file, with the context
func (*ServerF) KeepAliveWithContext ¶
func (obj *ServerF) KeepAliveWithContext(tarsCtx context.Context, serverInfo *ServerInfo, opts ...map[string]string) (ret int32, err error)
KeepAliveWithContext is the proxy function for the method defined in the tars file, with the context
func (*ServerF) ReportVersion ¶
func (obj *ServerF) ReportVersion(app string, serverName string, version string, opts ...map[string]string) (int32, error)
ReportVersion is the proxy function for the method defined in the tars file, with the context
func (*ServerF) ReportVersionOneWayWithContext ¶ added in v1.2.0
func (obj *ServerF) ReportVersionOneWayWithContext(tarsCtx context.Context, app string, serverName string, version string, opts ...map[string]string) (ret int32, err error)
ReportVersionOneWayWithContext is the proxy function for the method defined in the tars file, with the context
func (*ServerF) ReportVersionWithContext ¶
func (obj *ServerF) ReportVersionWithContext(tarsCtx context.Context, app string, serverName string, version string, opts ...map[string]string) (ret int32, err error)
ReportVersionWithContext is the proxy function for the method defined in the tars file, with the context
func (*ServerF) SetServant ¶
SetServant sets servant for the service.
func (*ServerF) TarsSetProtocol ¶ added in v1.2.0
TarsSetProtocol sets the protocol for the servant.
func (*ServerF) TarsSetTimeout ¶
TarsSetTimeout sets the timeout for the servant which is in ms.
type ServerFServant ¶ added in v1.3.0
type ServerFServantWithContext ¶ added in v1.3.0
type ServerFServantWithContext interface { KeepAlive(tarsCtx context.Context, serverInfo *ServerInfo) (ret int32, err error) KeepActiving(tarsCtx context.Context, serverInfo *ServerInfo) (ret int32, err error) ReportVersion(tarsCtx context.Context, app string, serverName string, version string) (ret int32, err error) GetLatestKeepAliveTime(tarsCtx context.Context) (ret uint32, err error) }
type ServerInfo ¶
type ServerInfo struct { Application string `json:"application" tars:"application,tag:0,require:true"` ServerName string `json:"serverName" tars:"serverName,tag:1,require:true"` Pid int32 `json:"pid" tars:"pid,tag:2,require:true"` Adapter string `json:"adapter" tars:"adapter,tag:3,require:false"` }
ServerInfo struct implement
func (*ServerInfo) ReadFrom ¶
func (st *ServerInfo) ReadFrom(readBuf *codec.Reader) error
ReadFrom reads from readBuf and put into struct.
func (*ServerInfo) ResetDefault ¶ added in v1.2.0
func (st *ServerInfo) ResetDefault()
func (*ServerInfo) WriteBlock ¶
func (st *ServerInfo) WriteBlock(buf *codec.Buffer, tag byte) error
WriteBlock encode struct