代码拉取完成,页面将自动刷新
package idlrpc
type ServiceStatus uint32
const (
SERVICE_RESOLVED ServiceStatus = iota + 1 //ready for servicing
SERVICE_UPDATING //stop receive message, wait for update
)
type (
//IStub rpc stub of service's side
IStub interface {
//GetUUID service uuid, generate by rpc-repo
GetUUID() SvcUuid
//GetServiceName service name
GetServiceName() string
//GetSignature method human-readable name
GetSignature(methodId uint32) string
//GetMultipleNum will return the number of concurrent coroutines for the service
GetMultipleNum() uint32
//IsOneWay that returns whether the method is oneway
IsOneWay(uint32) bool
// GetTimeout will return the timeout config of the method
GetTimeout(uint32) uint32
// Call will call the microservice method and returns the serialized data with the error code
Call(IServiceContext, uint32, []byte) ([]byte, error)
// Return In non-immediate mode, the call can be returned to the sender
Return(IServiceContext, uint32, interface{}, error) ([]byte, error)
//OnAfterFork invoke by framework after spawned
//init service data or load db data in this function
OnAfterFork(IServiceContext) bool
//OnBeforeDestroy invoke by framework before uninitialized
//clean service data in this function
OnBeforeDestroy() bool
//OnTick tick by service manager in logic tick
OnTick() bool
//GetStatus get service status
//TODO: for hot update
GetStatus() ServiceStatus
//SetStatus set service status
SetStatus(ServiceStatus)
//OnSub will notify service sub info
OnSub(string, string, []byte) error
//OnCancel will notify subscriber remove sub
OnCancel(string, string) error
}
)
// StubCreator stub factory
type StubCreator func(v interface{}) IStub
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。