Documentation ¶
Overview ¶
Code generated by ksf2go 1.3.22, DO NOT EDIT. This file was generated from /home/cc/workspace/KsfGo/ksf/protocol/res/NodeF.ksf Package nodef comment
Code generated by ksf2go 1.3.22, DO NOT EDIT. This file was generated from /home/cc/workspace/KsfGo/ksf/protocol/res/NodeF.ksf Package nodef comment
Index ¶
- type ServerF
- func (obj *ServerF) AllEndpoints() (active []*endpoint.Endpoint, inactive []*endpoint.Endpoint)
- func (obj *ServerF) Dispatch(ksfCtx context.Context, val interface{}, ksfReq *requestf.RequestPacket, ...) (err error)
- func (obj *ServerF) Endpoints() (active []*endpoint.Endpoint)
- func (obj *ServerF) GetServant() (servant *model.Servant)
- func (obj *ServerF) KeepAlive(serverInfo *ServerInfo, opts ...map[string]string) (int32, error)
- func (obj *ServerF) KeepAliveOneWayWithContext(ksfCtx context.Context, serverInfo *ServerInfo, opts ...map[string]string) (ret int32, err error)
- func (obj *ServerF) KeepAliveWithContext(ksfCtx context.Context, serverInfo *ServerInfo, opts ...map[string]string) (ret int32, err error)
- func (obj *ServerF) KsfPing()
- func (obj *ServerF) KsfPingWithContext(ksfCtx context.Context)
- func (obj *ServerF) KsfSetProtocol(p model.Protocol)
- func (obj *ServerF) KsfSetTimeout(timeout int)
- func (obj *ServerF) ReportVersion(app string, serverName string, version string, opts ...map[string]string) (int32, error)
- func (obj *ServerF) ReportVersionOneWayWithContext(ksfCtx context.Context, app string, serverName string, version string, ...) (ret int32, err error)
- func (obj *ServerF) ReportVersionWithContext(ksfCtx context.Context, app string, serverName string, version string, ...) (ret int32, err error)
- func (obj *ServerF) SetOnCloseCallback(callback func(string))
- func (obj *ServerF) SetOnConnectCallback(callback func(string))
- func (obj *ServerF) SetPushCallback(callback func([]byte))
- func (obj *ServerF) SetServant(servant model.Servant)
- 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.38
func NewServerF() *ServerF
NewServerF creates a new ServerF servant.
func (*ServerF) AllEndpoints ¶ added in v1.4.39
Endpoints returns all endpoint.Endpoint
func (*ServerF) Dispatch ¶
func (obj *ServerF) 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 (*ServerF) Endpoints ¶ added in v1.4.38
Endpoints returns all active endpoint.Endpoint
func (*ServerF) GetServant ¶ added in v1.4.38
GetServant gets servant for the service.
func (*ServerF) KeepAlive ¶
KeepAlive is the proxy function for the method defined in the ksf file, with the context
func (*ServerF) KeepAliveOneWayWithContext ¶
func (obj *ServerF) KeepAliveOneWayWithContext(ksfCtx context.Context, serverInfo *ServerInfo, opts ...map[string]string) (ret int32, err error)
KeepAliveOneWayWithContext is the proxy function for the method defined in the ksf file, with the context
func (*ServerF) KeepAliveWithContext ¶
func (obj *ServerF) KeepAliveWithContext(ksfCtx context.Context, serverInfo *ServerInfo, opts ...map[string]string) (ret int32, err error)
KeepAliveWithContext is the proxy function for the method defined in the ksf file, with the context
func (*ServerF) KsfPingWithContext ¶ added in v1.4.38
KsfPingWithContext
func (*ServerF) KsfSetProtocol ¶
KsfSetProtocol sets the protocol for the servant.
func (*ServerF) KsfSetTimeout ¶
KsfSetTimeout sets the timeout for the servant which is in ms.
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 ksf file, with the context
func (*ServerF) ReportVersionOneWayWithContext ¶
func (obj *ServerF) ReportVersionOneWayWithContext(ksfCtx 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 ksf file, with the context
func (*ServerF) ReportVersionWithContext ¶
func (obj *ServerF) ReportVersionWithContext(ksfCtx 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 ksf file, with the context
func (*ServerF) SetOnCloseCallback ¶ added in v1.4.38
SetOnCloseCallback
func (*ServerF) SetOnConnectCallback ¶ added in v1.4.38
SetOnConnectCallback
func (*ServerF) SetPushCallback ¶ added in v1.4.38
SetPushCallback
type ServerFServant ¶
type ServerFServantWithContext ¶
type ServerInfo ¶
type ServerInfo struct { Application string `json:"application" ksf:"application,tag:0,require:true"` ServerName string `json:"serverName" ksf:"serverName,tag:1,require:true"` Pid int32 `json:"pid" ksf:"pid,tag:2,require:true"` Adapter string `json:"adapter" ksf:"adapter,tag:3,require:false"` }
ServerInfo struct implement
func (*ServerInfo) ReadBlock ¶
ReadBlock reads struct from the given tag , require or optional.
func (*ServerInfo) ReadFrom ¶
func (st *ServerInfo) ReadFrom(readBuf *codec.Reader) error
ReadFrom reads from readBuf and put into struct.
func (*ServerInfo) ResetDefault ¶
func (st *ServerInfo) ResetDefault()
func (*ServerInfo) WriteBlock ¶
func (st *ServerInfo) WriteBlock(buf *codec.Buffer, tag byte) error
WriteBlock encode struct
func (*ServerInfo) WriteTo ¶
func (st *ServerInfo) WriteTo(buf *codec.Buffer) (err error)
WriteTo encode struct to buffer