nodef

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2022 License: BSD-3-Clause Imports: 12 Imported by: 2

Documentation

Overview

Package nodef comment This file was generated by tars2go 1.1.7 Generated from NodeF.tars

Package nodef comment This file was generated by tars2go 1.1.7 Generated from NodeF.tars

Index

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 (*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) KeepAlive

func (obj *ServerF) KeepAlive(serverInfo *ServerInfo, opts ...map[string]string) (ret int32, err error)

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) (ret int32, err 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

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

SetServant sets servant for the service.

func (*ServerF) TarsSetProtocol added in v1.2.0

func (obj *ServerF) TarsSetProtocol(p m.Protocol)

TarsSetProtocol sets the protocol for the servant.

func (*ServerF) TarsSetTimeout

func (obj *ServerF) TarsSetTimeout(timeout int)

TarsSetTimeout sets the timeout for the servant which is in ms.

type ServerFServant added in v1.3.0

type ServerFServant interface {
	KeepAlive(serverInfo *ServerInfo) (ret int32, err error)
	ReportVersion(app string, serverName string, version string) (ret int32, err error)
}

type ServerFServantWithContext added in v1.3.0

type ServerFServantWithContext interface {
	KeepAlive(tarsCtx context.Context, serverInfo *ServerInfo) (ret int32, err error)
	ReportVersion(tarsCtx context.Context, app string, serverName string, version string) (ret int32, err error)
}

type ServerInfo

type ServerInfo struct {
	Application string `json:"application"`
	ServerName  string `json:"serverName"`
	Pid         int32  `json:"pid"`
	Adapter     string `json:"adapter"`
}

ServerInfo struct implement

func (*ServerInfo) ReadBlock

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

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

func (*ServerInfo) WriteTo

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

WriteTo encode struct to buffer

Jump to

Keyboard shortcuts

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