Documentation
¶
Index ¶
- Constants
- Variables
- func CheckAndRegisterEntity(ins htypes.Any, router IRouter) *herrors.Error
- type API
- type APIDefine
- type APIGateWayImplement
- func (this *APIGateWayImplement) Class() string
- func (this *APIGateWayImplement) Config() IEntityConf
- func (this *APIGateWayImplement) Connectors() map[string]IAPIConnector
- func (this *APIGateWayImplement) EntityMeta() *EntityMeta
- func (this *APIGateWayImplement) EntityStub() *EntityStub
- func (this *APIGateWayImplement) I18n() IAPIi18n
- func (this *APIGateWayImplement) Packer(name string) IAPIDataPacker
- func (this *APIGateWayImplement) PreRequestMiddleware(version, api string, params htypes.Map) (err *herrors.Error)
- func (this *APIGateWayImplement) RequestAPI(version string, api string, params htypes.Map) (ret htypes.Any, err *herrors.Error)
- func (this *APIGateWayImplement) RequestWSAPI(version, api string, params htypes.Map) (ret htypes.Any, err *herrors.Error)
- func (this *APIGateWayImplement) Router() IRouter
- func (this *APIGateWayImplement) Server() IServer
- func (this *APIGateWayImplement) Shutdown()
- func (this *APIGateWayImplement) Start()
- type APIGateway
- type APIGatewayOptions
- type BaseAPIi18n
- type BaseAssetManager
- type BaseConnector
- type BaseMiddleware
- func (this *BaseMiddleware) Class() string
- func (this *BaseMiddleware) Close()
- func (this *BaseMiddleware) EntityMeta() *EntityMeta
- func (this *BaseMiddleware) HandleIn(seq uint64, service string, slot string, data htypes.Map) (stop bool, err *herrors.Error)
- func (this *BaseMiddleware) HandleOut(seq uint64, service string, slot string, result htypes.Any, e *herrors.Error) (stop bool, err *herrors.Error)
- func (this *BaseMiddleware) Open(gw IAPIGateway, ins IAPIMiddleware) *herrors.Error
- func (this *BaseMiddleware) Server() IServer
- type BasePacker
- func (this *BasePacker) Class() string
- func (this *BasePacker) Close()
- func (this *BasePacker) EntityMeta() *EntityMeta
- func (this *BasePacker) EntityStub() *EntityStub
- func (this *BasePacker) Marshal(data htypes.Any) ([]byte, *herrors.Error)
- func (this *BasePacker) Open(gw IAPIGateway, ins IAPIDataPacker) *herrors.Error
- func (this *BasePacker) Server() IServer
- func (this *BasePacker) Unmarshal(bytes []byte) (htypes.Any, *herrors.Error)
- type BasePlugin
- type BaseRouter
- func (this *BaseRouter) AllEntities() []*EntityMeta
- func (this *BaseRouter) Class() string
- func (this *BaseRouter) Close()
- func (this *BaseRouter) EntityMeta() *EntityMeta
- func (this *BaseRouter) ManageEntity(mm *EntityMeta, slot string, params htypes.Map) (htypes.Any, *herrors.Error)
- func (this *BaseRouter) Open(s IServer, ins IRouter) *herrors.Error
- func (this *BaseRouter) ParseEntityMeta(s string) *EntityMeta
- func (this *BaseRouter) RegisterEntity(m IEntity) *herrors.Error
- func (this *BaseRouter) RegisterService(s IService) *herrors.Error
- func (this *BaseRouter) Server() IServer
- func (this *BaseRouter) UnRegisterService(s IService)
- type CallerResponse
- type CmdArgs
- type ConnectorConf
- type DefaultAPIi18n
- type EndPoint
- type EntityConfBase
- type EntityGetter
- type EntityMeta
- type EntitySetter
- type EntityStub
- type EntityStubOptions
- type FileAssets
- type IAPIConnector
- type IAPIDataPacker
- type IAPIGateway
- type IAPIMiddleware
- type IAPIi18n
- type IAssetManager
- type IEntity
- type IEntityConf
- type IPlugin
- type IRouter
- type IServer
- type IService
- type ISlotRequest
- type InMiddleware
- type InOutMiddleware
- type MethodCaller
- type OpenAPI
- type OutMiddleware
- type PbServiceRequest
- func (*PbServiceRequest) Descriptor() ([]byte, []int)
- func (m *PbServiceRequest) GetEncoding() string
- func (m *PbServiceRequest) GetName() string
- func (m *PbServiceRequest) GetParams() []byte
- func (m *PbServiceRequest) GetSlot() string
- func (m *PbServiceRequest) Marshal() (dAtA []byte, err error)
- func (m *PbServiceRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *PbServiceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PbServiceRequest) ProtoMessage()
- func (m *PbServiceRequest) Reset()
- func (m *PbServiceRequest) Size() (n int)
- func (m *PbServiceRequest) String() string
- func (m *PbServiceRequest) Unmarshal(dAtA []byte) error
- func (m *PbServiceRequest) XXX_DiscardUnknown()
- func (m *PbServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PbServiceRequest) XXX_Merge(src proto.Message)
- func (m *PbServiceRequest) XXX_Size() int
- func (m *PbServiceRequest) XXX_Unmarshal(b []byte) error
- type PbServiceResponse
- func (*PbServiceResponse) Descriptor() ([]byte, []int)
- func (m *PbServiceResponse) GetData() []byte
- func (m *PbServiceResponse) GetMessage() string
- func (m *PbServiceResponse) GetSuccess() bool
- func (m *PbServiceResponse) Marshal() (dAtA []byte, err error)
- func (m *PbServiceResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *PbServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PbServiceResponse) ProtoMessage()
- func (m *PbServiceResponse) Reset()
- func (m *PbServiceResponse) Size() (n int)
- func (m *PbServiceResponse) String() string
- func (m *PbServiceResponse) Unmarshal(dAtA []byte) error
- func (m *PbServiceResponse) XXX_DiscardUnknown()
- func (m *PbServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PbServiceResponse) XXX_Merge(src proto.Message)
- func (m *PbServiceResponse) XXX_Size() int
- func (m *PbServiceResponse) XXX_Unmarshal(b []byte) error
- type PluginConf
- type RpcRequestArguments
- type Server
- type ServerImplement
- func (this *ServerImplement) Assets() IAssetManager
- func (this *ServerImplement) Class() string
- func (this *ServerImplement) Config() IEntityConf
- func (this *ServerImplement) EntityMeta() *EntityMeta
- func (this *ServerImplement) EntityStub() *EntityStub
- func (this *ServerImplement) Plugin(cls string) IPlugin
- func (this *ServerImplement) RegisterService(service IService, options htypes.Any)
- func (this *ServerImplement) RequestService(service string, slot string, params htypes.Map) (ret htypes.Any, err *herrors.Error)
- func (this *ServerImplement) Router() IRouter
- func (this *ServerImplement) Server() IServer
- func (this *ServerImplement) Services() map[string]IService
- func (this *ServerImplement) Shutdown()
- func (this *ServerImplement) Slot(service string, slot string) *Slot
- func (this *ServerImplement) Start()
- type ServerOptions
- type Service
- func (this *Service) BoolTypeTransform(params *htypes.Map)
- func (this *Service) Class() string
- func (this *Service) Close()
- func (this *Service) EntityMeta() *EntityMeta
- func (this *Service) LimitedSlots() []string
- func (this *Service) Name() string
- func (this *Service) Open(s IServer, instance IService, options htypes.Any) *herrors.Error
- func (this *Service) Request(slot string, params htypes.Map) (htypes.Any, *herrors.Error)
- func (this *Service) Response(res *SlotResponse, data htypes.Any, err *herrors.Error)
- func (this *Service) Server() IServer
- func (this *Service) Slot(slot string) *Slot
- func (this *Service) Slots(req *SlotsRequest, res *SlotResponse)
- func (this *Service) UsePlugin(name string) IPlugin
- type ServiceConf
- type Slot
- type SlotParameter
- type SlotRequestBase
- type SlotResponse
- type SlotWsRequestBase
- type SlotsRequest
Constants ¶
View Source
const ( LangDir = "lang" CnZh = "cn-zh" )
View Source
const ( MiddlewareTypeIn = "in" MiddlewareTypeOut = "out" MiddlewareTypeInOut = "in/out" )
View Source
const ( EntityTypeService = "service" EntityTypeApiGateway = "api_gateway" EntityTypeServer = "server" EntityTypeConnector = "api_connector" EntityTypePlugin = "plugin" EntityTypeRouter = "router" EntityTypeMiddleware = "api_middleware" EntityTypeDataPacker = "api_datapacker" ManagePing = "Ping" ManageGetLoad = "GetLoad" ManageResetConfig = "ResetConfig" ManageUpdateConfigItems = "UpdateConfigItems" ManageGetConfig = "GetConfig" ManageGetConfigItems = "GetConfigItems" )
View Source
const (
RpcServiceRequestName = "HandleServiceRequested"
)
Variables ¶
Functions ¶
Types ¶
type APIGateWayImplement ¶
type APIGateWayImplement struct {
// contains filtered or unexported fields
}
func NewAPIGateway ¶
func NewAPIGateway(opt *APIGatewayOptions, args ...htypes.Any) *APIGateWayImplement
func (*APIGateWayImplement) Class ¶
func (this *APIGateWayImplement) Class() string
func (*APIGateWayImplement) Config ¶
func (this *APIGateWayImplement) Config() IEntityConf
func (*APIGateWayImplement) Connectors ¶ added in v1.1.29
func (this *APIGateWayImplement) Connectors() map[string]IAPIConnector
func (*APIGateWayImplement) EntityMeta ¶
func (this *APIGateWayImplement) EntityMeta() *EntityMeta
func (*APIGateWayImplement) EntityStub ¶
func (this *APIGateWayImplement) EntityStub() *EntityStub
func (*APIGateWayImplement) I18n ¶
func (this *APIGateWayImplement) I18n() IAPIi18n
func (*APIGateWayImplement) Packer ¶
func (this *APIGateWayImplement) Packer(name string) IAPIDataPacker
func (*APIGateWayImplement) PreRequestMiddleware ¶ added in v1.1.29
func (*APIGateWayImplement) RequestAPI ¶
func (*APIGateWayImplement) RequestWSAPI ¶ added in v1.1.29
func (*APIGateWayImplement) Router ¶
func (this *APIGateWayImplement) Router() IRouter
func (*APIGateWayImplement) Server ¶
func (this *APIGateWayImplement) Server() IServer
func (*APIGateWayImplement) Shutdown ¶
func (this *APIGateWayImplement) Shutdown()
func (*APIGateWayImplement) Start ¶
func (this *APIGateWayImplement) Start()
type APIGateway ¶
type APIGateway struct {
EntityConfBase
UseBreaker bool
BreakerLimitAPI bool //针对API
BreakerLimitIP bool //针对IP
BreakerLimitUser bool //针对用户
BreakerRequestTimeout int
BreakerMaxConcurrentRequest int
BreakerRequestVolumeThreshold int
BreakerSleepWindow int
BreakerErrorPercentThreshold int
BreakerDashboard bool
UserField string
AddressField string
}
type APIGatewayOptions ¶
type APIGatewayOptions struct {
ServerOptions
Connectors []IAPIConnector
Middlewares []IAPIMiddleware
Packers []IAPIDataPacker
I18n IAPIi18n
}
type BaseAPIi18n ¶
type BaseAPIi18n struct {
// contains filtered or unexported fields
}
func (*BaseAPIi18n) Close ¶
func (this *BaseAPIi18n) Close()
func (*BaseAPIi18n) Open ¶
func (this *BaseAPIi18n) Open() bool
type BaseAssetManager ¶
type BaseAssetManager struct {
}
func (*BaseAssetManager) Init ¶
func (this *BaseAssetManager) Init() *herrors.Error
type BaseConnector ¶
type BaseConnector struct {
Gateway IAPIGateway
Packer IAPIDataPacker
// contains filtered or unexported fields
}
func (*BaseConnector) Class ¶
func (this *BaseConnector) Class() string
func (*BaseConnector) Close ¶
func (this *BaseConnector) Close()
func (*BaseConnector) EntityMeta ¶
func (this *BaseConnector) EntityMeta() *EntityMeta
func (*BaseConnector) Name ¶ added in v1.1.29
func (this *BaseConnector) Name() string
func (*BaseConnector) Open ¶
func (this *BaseConnector) Open(gw IAPIGateway, ins IAPIConnector) *herrors.Error
func (*BaseConnector) Server ¶
func (this *BaseConnector) Server() IServer
type BaseMiddleware ¶
type BaseMiddleware struct {
Gateway IAPIGateway
// contains filtered or unexported fields
}
func (*BaseMiddleware) Class ¶
func (this *BaseMiddleware) Class() string
func (*BaseMiddleware) Close ¶
func (this *BaseMiddleware) Close()
func (*BaseMiddleware) EntityMeta ¶
func (this *BaseMiddleware) EntityMeta() *EntityMeta
func (*BaseMiddleware) Open ¶
func (this *BaseMiddleware) Open(gw IAPIGateway, ins IAPIMiddleware) *herrors.Error
func (*BaseMiddleware) Server ¶
func (this *BaseMiddleware) Server() IServer
type BasePacker ¶
type BasePacker struct {
// contains filtered or unexported fields
}
func (*BasePacker) Class ¶
func (this *BasePacker) Class() string
func (*BasePacker) Close ¶
func (this *BasePacker) Close()
func (*BasePacker) EntityMeta ¶
func (this *BasePacker) EntityMeta() *EntityMeta
func (*BasePacker) EntityStub ¶
func (this *BasePacker) EntityStub() *EntityStub
func (*BasePacker) Open ¶
func (this *BasePacker) Open(gw IAPIGateway, ins IAPIDataPacker) *herrors.Error
func (*BasePacker) Server ¶
func (this *BasePacker) Server() IServer
type BasePlugin ¶
type BasePlugin struct {
// contains filtered or unexported fields
}
func (*BasePlugin) Capability ¶
func (this *BasePlugin) Capability() htypes.Any
func (*BasePlugin) Class ¶
func (this *BasePlugin) Class() string
func (*BasePlugin) Close ¶
func (this *BasePlugin) Close()
func (*BasePlugin) EntityMeta ¶
func (this *BasePlugin) EntityMeta() *EntityMeta
func (*BasePlugin) Server ¶
func (this *BasePlugin) Server() IServer
type BaseRouter ¶
type BaseRouter struct {
Services map[string]IService
Entities map[string]IEntity
// contains filtered or unexported fields
}
func (*BaseRouter) AllEntities ¶
func (this *BaseRouter) AllEntities() []*EntityMeta
func (*BaseRouter) Class ¶
func (this *BaseRouter) Class() string
func (*BaseRouter) Close ¶
func (this *BaseRouter) Close()
func (*BaseRouter) EntityMeta ¶
func (this *BaseRouter) EntityMeta() *EntityMeta
func (*BaseRouter) ManageEntity ¶
func (this *BaseRouter) ManageEntity(mm *EntityMeta, slot string, params htypes.Map) (htypes.Any, *herrors.Error)
func (*BaseRouter) ParseEntityMeta ¶
func (this *BaseRouter) ParseEntityMeta(s string) *EntityMeta
func (*BaseRouter) RegisterEntity ¶
func (this *BaseRouter) RegisterEntity(m IEntity) *herrors.Error
func (*BaseRouter) RegisterService ¶
func (this *BaseRouter) RegisterService(s IService) *herrors.Error
func (*BaseRouter) Server ¶
func (this *BaseRouter) Server() IServer
func (*BaseRouter) UnRegisterService ¶
func (this *BaseRouter) UnRegisterService(s IService)
type CallerResponse ¶
type CmdArgs ¶ added in v1.1.11
type CmdArgs struct {
Env string `cli:"e,env" usage:"当前运行环境(dev/test)"`
}
type ConnectorConf ¶
type ConnectorConf struct {
EntityConfBase
Lang string
Packer string
Name string
}
type DefaultAPIi18n ¶
type DefaultAPIi18n struct {
BaseAPIi18n
// contains filtered or unexported fields
}
func (*DefaultAPIi18n) Class ¶
func (this *DefaultAPIi18n) Class() string
func (*DefaultAPIi18n) Open ¶
func (this *DefaultAPIi18n) Open() *herrors.Error
type EntityConfBase ¶
func (*EntityConfBase) GetDisabled ¶
func (this *EntityConfBase) GetDisabled() bool
func (*EntityConfBase) GetEID ¶
func (this *EntityConfBase) GetEID() string
func (*EntityConfBase) SetDisabled ¶
func (this *EntityConfBase) SetDisabled(dis bool)
func (*EntityConfBase) SetEID ¶
func (this *EntityConfBase) SetEID(eid string)
type EntityMeta ¶
type EntityStub ¶
type EntityStub struct {
// contains filtered or unexported fields
}
func NewEntityStub ¶
func NewEntityStub(opt *EntityStubOptions) *EntityStub
type EntityStubOptions ¶
type EntityStubOptions struct {
Owner IEntity
Ping EntityGetter //联通情况
GetLoad EntityGetter //负载情况
ResetConfig EntitySetter //恢复设置
UpdateConfigItems EntitySetter //修改设置
GetConfig EntityGetter //获取全部配置
GetConfigItems EntityGetter //获取某项配置
}
type FileAssets ¶
type FileAssets struct {
BaseAssetManager
}
type IAPIConnector ¶
type IAPIConnector interface {
Open(gw IAPIGateway, ins IAPIConnector) *herrors.Error
Name() string
Close()
}
type IAPIDataPacker ¶
type IAPIGateway ¶
type IAPIGateway interface {
Start()
Shutdown()
Server() IServer
Router() IRouter
Packer(name string) IAPIDataPacker
I18n() IAPIi18n
PreRequestMiddleware(version string, api string, params htypes.Map) *herrors.Error
RequestAPI(version string, api string, params htypes.Map) (htypes.Any, *herrors.Error)
RequestWSAPI(version string, api string, params htypes.Map) (htypes.Any, *herrors.Error)
}
type IAPIMiddleware ¶
type IAPIMiddleware interface {
Open(gw IAPIGateway, ins IAPIMiddleware) *herrors.Error
Close()
HandleIn(seq uint64, version string, api string, data htypes.Map) (stop bool, err *herrors.Error) //入口处理
HandleOut(seq uint64, version string, api string, result htypes.Any, e *herrors.Error) (stop bool, err *herrors.Error) //出口处理
Type() string
}
type IAssetManager ¶
type IEntity ¶
type IEntity interface {
Class() string
Server() IServer
Config() IEntityConf
EntityMeta() *EntityMeta
EntityStub() *EntityStub
}
type IEntityConf ¶
type IRouter ¶
type IRouter interface {
Open(s IServer, ins IRouter) *herrors.Error
Close()
//服务相关方法
RegisterService(s IService) *herrors.Error //注册服务
UnRegisterService(s IService) //注销服务
RequestService(service string, slot string, params htypes.Map) (htypes.Any, *herrors.Error) //同步请求服务
// 实体治理相关方法
AllEntities() []*EntityMeta
RegisterEntity(m IEntity) *herrors.Error
ManageEntity(mm *EntityMeta, slot string, params htypes.Map) (htypes.Any, *herrors.Error)
}
type IServer ¶
type IServer interface {
Start()
Shutdown()
Router() IRouter
Plugin(cls string) IPlugin
Services() map[string]IService
Slot(service string, slot string) *Slot
Assets() IAssetManager
RegisterService(service IService, options htypes.Any)
RequestService(service string, slot string, params htypes.Map) (htypes.Any, *herrors.Error)
}
type ISlotRequest ¶ added in v1.1.0
type InMiddleware ¶
type InMiddleware struct {
BaseMiddleware
}
func (*InMiddleware) Type ¶
func (this *InMiddleware) Type() string
type InOutMiddleware ¶
type InOutMiddleware struct {
BaseMiddleware
}
func (*InOutMiddleware) Type ¶
func (this *InOutMiddleware) Type() string
type OutMiddleware ¶
type OutMiddleware struct {
BaseMiddleware
}
func (*OutMiddleware) Type ¶
func (this *OutMiddleware) Type() string
type PbServiceRequest ¶
type PbServiceRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Slot string `protobuf:"bytes,2,opt,name=slot,proto3" json:"slot,omitempty"`
Encoding string `protobuf:"bytes,3,opt,name=encoding,proto3" json:"encoding,omitempty"`
Params []byte `protobuf:"bytes,4,opt,name=params,proto3" json:"params,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*PbServiceRequest) Descriptor ¶
func (*PbServiceRequest) Descriptor() ([]byte, []int)
func (*PbServiceRequest) GetEncoding ¶
func (m *PbServiceRequest) GetEncoding() string
func (*PbServiceRequest) GetName ¶
func (m *PbServiceRequest) GetName() string
func (*PbServiceRequest) GetParams ¶
func (m *PbServiceRequest) GetParams() []byte
func (*PbServiceRequest) GetSlot ¶
func (m *PbServiceRequest) GetSlot() string
func (*PbServiceRequest) Marshal ¶
func (m *PbServiceRequest) Marshal() (dAtA []byte, err error)
func (*PbServiceRequest) MarshalToSizedBuffer ¶
func (m *PbServiceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PbServiceRequest) ProtoMessage ¶
func (*PbServiceRequest) ProtoMessage()
func (*PbServiceRequest) Reset ¶
func (m *PbServiceRequest) Reset()
func (*PbServiceRequest) Size ¶
func (m *PbServiceRequest) Size() (n int)
func (*PbServiceRequest) String ¶
func (m *PbServiceRequest) String() string
func (*PbServiceRequest) Unmarshal ¶
func (m *PbServiceRequest) Unmarshal(dAtA []byte) error
func (*PbServiceRequest) XXX_DiscardUnknown ¶
func (m *PbServiceRequest) XXX_DiscardUnknown()
func (*PbServiceRequest) XXX_Marshal ¶
func (m *PbServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PbServiceRequest) XXX_Merge ¶
func (m *PbServiceRequest) XXX_Merge(src proto.Message)
func (*PbServiceRequest) XXX_Size ¶
func (m *PbServiceRequest) XXX_Size() int
func (*PbServiceRequest) XXX_Unmarshal ¶
func (m *PbServiceRequest) XXX_Unmarshal(b []byte) error
type PbServiceResponse ¶
type PbServiceResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*PbServiceResponse) Descriptor ¶
func (*PbServiceResponse) Descriptor() ([]byte, []int)
func (*PbServiceResponse) GetData ¶
func (m *PbServiceResponse) GetData() []byte
func (*PbServiceResponse) GetMessage ¶
func (m *PbServiceResponse) GetMessage() string
func (*PbServiceResponse) GetSuccess ¶
func (m *PbServiceResponse) GetSuccess() bool
func (*PbServiceResponse) Marshal ¶
func (m *PbServiceResponse) Marshal() (dAtA []byte, err error)
func (*PbServiceResponse) MarshalTo ¶
func (m *PbServiceResponse) MarshalTo(dAtA []byte) (int, error)
func (*PbServiceResponse) MarshalToSizedBuffer ¶
func (m *PbServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PbServiceResponse) ProtoMessage ¶
func (*PbServiceResponse) ProtoMessage()
func (*PbServiceResponse) Reset ¶
func (m *PbServiceResponse) Reset()
func (*PbServiceResponse) Size ¶
func (m *PbServiceResponse) Size() (n int)
func (*PbServiceResponse) String ¶
func (m *PbServiceResponse) String() string
func (*PbServiceResponse) Unmarshal ¶
func (m *PbServiceResponse) Unmarshal(dAtA []byte) error
func (*PbServiceResponse) XXX_DiscardUnknown ¶
func (m *PbServiceResponse) XXX_DiscardUnknown()
func (*PbServiceResponse) XXX_Marshal ¶
func (m *PbServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PbServiceResponse) XXX_Merge ¶
func (m *PbServiceResponse) XXX_Merge(src proto.Message)
func (*PbServiceResponse) XXX_Size ¶
func (m *PbServiceResponse) XXX_Size() int
func (*PbServiceResponse) XXX_Unmarshal ¶
func (m *PbServiceResponse) XXX_Unmarshal(b []byte) error
type PluginConf ¶
type PluginConf struct {
EntityConfBase
}
type RpcRequestArguments ¶
type Server ¶
type Server struct {
EntityConfBase
MaxProcs int
PprofPort int
}
type ServerImplement ¶
type ServerImplement struct {
Instance IServer
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(opt *ServerOptions, args ...htypes.Any) *ServerImplement
func (*ServerImplement) Assets ¶
func (this *ServerImplement) Assets() IAssetManager
func (*ServerImplement) Class ¶
func (this *ServerImplement) Class() string
func (*ServerImplement) Config ¶
func (this *ServerImplement) Config() IEntityConf
func (*ServerImplement) EntityMeta ¶
func (this *ServerImplement) EntityMeta() *EntityMeta
func (*ServerImplement) EntityStub ¶
func (this *ServerImplement) EntityStub() *EntityStub
func (*ServerImplement) Plugin ¶
func (this *ServerImplement) Plugin(cls string) IPlugin
func (*ServerImplement) RegisterService ¶
func (this *ServerImplement) RegisterService(service IService, options htypes.Any)
func (*ServerImplement) RequestService ¶
func (*ServerImplement) Router ¶
func (this *ServerImplement) Router() IRouter
func (*ServerImplement) Server ¶
func (this *ServerImplement) Server() IServer
func (*ServerImplement) Services ¶
func (this *ServerImplement) Services() map[string]IService
func (*ServerImplement) Shutdown ¶
func (this *ServerImplement) Shutdown()
func (*ServerImplement) Start ¶
func (this *ServerImplement) Start()
type ServerOptions ¶
type ServerOptions struct {
Router IRouter
Plugins []IPlugin
AssetsManager IAssetManager
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) BoolTypeTransform ¶ added in v1.1.18
func (*Service) EntityMeta ¶
func (this *Service) EntityMeta() *EntityMeta
func (*Service) LimitedSlots ¶
func (*Service) Slots ¶ added in v1.1.0
func (this *Service) Slots(req *SlotsRequest, res *SlotResponse)
type ServiceConf ¶
type ServiceConf struct {
EntityConfBase
Name string
LimitedSlots string
}
type Slot ¶
type Slot struct {
Name string `json:"name"`
Params map[string]*SlotParameter `json:"params"`
ReqInstance htypes.Any
}
type SlotParameter ¶ added in v1.1.0
type SlotRequestBase ¶ added in v1.1.0
type SlotRequestBase struct {
}
type SlotResponse ¶
type SlotWsRequestBase ¶ added in v1.1.29
type SlotWsRequestBase struct {
SlotRequestBase
WsID *string `json:"WsID"`
INITWS *bool `json:"INITWS"`
BREAK *bool `json:"BREAK"`
}
type SlotsRequest ¶ added in v1.1.0
type SlotsRequest struct {
SlotRequestBase
}
Click to show internal directories.
Click to hide internal directories.