cluster

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterService

type ClusterService struct {
	cbase.ServiceBase

	ClusterService base.IClusterService
	// contains filtered or unexported fields
}

func (*ClusterService) Configure

func (this *ClusterService) Configure(opts ...Option)

func (*ClusterService) DefauleRpcRouteRules

func (this *ClusterService) DefauleRpcRouteRules(stype string) (ss core.IServiceSession, err error)

默认路由规则

func (*ClusterService) Destroy

func (this *ClusterService) Destroy() (err error)

func (*ClusterService) GetCategory

func (this *ClusterService) GetCategory() core.S_Category

func (*ClusterService) GetId

func (this *ClusterService) GetId() string

func (*ClusterService) GetPreWeight

func (this *ClusterService) GetPreWeight() int32

func (*ClusterService) GetRpcId

func (this *ClusterService) GetRpcId() string

func (*ClusterService) GetSessionsByCategory

func (this *ClusterService) GetSessionsByCategory(category core.S_Category) (ss []core.IServiceSession)

func (*ClusterService) GetSettings

func (this *ClusterService) GetSettings() core.ServiceSttings

func (*ClusterService) GetTag

func (this *ClusterService) GetTag() string

func (*ClusterService) GetType

func (this *ClusterService) GetType() string

func (*ClusterService) GetVersion

func (this *ClusterService) GetVersion() int32

func (*ClusterService) GetWorkPath

func (this *ClusterService) GetWorkPath() string

func (*ClusterService) Init

func (this *ClusterService) Init(service core.IService) (err error)

func (*ClusterService) InitSys

func (this *ClusterService) InitSys()

func (*ClusterService) Options

func (this *ClusterService) Options() *Options

func (*ClusterService) Register

func (this *ClusterService) Register(id core.Rpc_Key, f interface{}) (err error)

func (*ClusterService) RegisterGO

func (this *ClusterService) RegisterGO(id core.Rpc_Key, f interface{}) (err error)

func (*ClusterService) ReleaseRpc

func (this *ClusterService) ReleaseRpc(rkey core.Rpc_Key, arg ...interface{})

func (*ClusterService) RpcInvokeById

func (this *ClusterService) RpcInvokeById(sId string, rkey core.Rpc_Key, iscall bool, arg ...interface{}) (result interface{}, err error)

func (*ClusterService) RpcInvokeByType

func (this *ClusterService) RpcInvokeByType(sType string, rkey core.Rpc_Key, iscall bool, arg ...interface{}) (result interface{}, err error)

func (*ClusterService) Start

func (this *ClusterService) Start() (err error)

func (*ClusterService) Subscribe

func (this *ClusterService) Subscribe(id core.Rpc_Key, f interface{}) (err error)

func (*ClusterService) UnSubscribe

func (this *ClusterService) UnSubscribe(id core.Rpc_Key, f interface{}) (err error)

func (*ClusterService) WatcherServiceSession

func (this *ClusterService) WatcherServiceSession(sId string)

注销服务会话

type Option

type Option func(*Options)

func SetCategory

func SetCategory(v core.S_Category) Option

func SetDebugMode

func SetDebugMode(v bool) Option

func SetId

func SetId(v string) Option

func SetLogLvel

func SetLogLvel(v log.Loglevel) Option

func SetRpcLog

func SetRpcLog(v bool) Option

func SetTag

func SetTag(v string) Option

func SetType

func SetType(v string) Option

func SetVersion

func SetVersion(v int32) Option

func SetWorkPath

func SetWorkPath(v string) Option

type Options

type Options struct {
	Tag       string
	Id        string
	Type      string
	Category  core.S_Category
	Version   int32
	WorkPath  string
	Setting   core.ServiceSttings
	Debugmode bool
	LogLvel   log.Loglevel
	RpcLog    bool
}

Jump to

Keyboard shortcuts

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