cluster

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 18 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
	ServiceMonitor core.IServiceMonitor
	IsInClustered  bool
	// contains filtered or unexported fields
}

func (*ClusterService) Configure

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

func (*ClusterService) DefauleRpcRouteRules

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

默认路由规则

func (*ClusterService) Destroy

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

func (*ClusterService) FindServiceHandlefunc

func (this *ClusterService) FindServiceHandlefunc(node registry.ServiceNode)

注册服务会话 当有新的服务加入时

func (*ClusterService) GetCategory

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

func (*ClusterService) GetId

func (this *ClusterService) GetId() string

func (*ClusterService) GetIp

func (this *ClusterService) GetIp() string

func (*ClusterService) GetPreWeight

func (this *ClusterService) GetPreWeight() float64

func (*ClusterService) GetRpcId

func (this *ClusterService) GetRpcId() string

func (*ClusterService) GetServiceMonitor

func (this *ClusterService) GetServiceMonitor() core.IServiceMonitor

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() string

func (*ClusterService) Init

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

func (*ClusterService) InitSys

func (this *ClusterService) InitSys()

func (*ClusterService) LoseServiceHandlefunc

func (this *ClusterService) LoseServiceHandlefunc(sId string)

注销服务会话

func (*ClusterService) Options

func (this *ClusterService) Options() *Options

func (*ClusterService) Register

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

func (*ClusterService) RegisterGO

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

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

func (this *ClusterService) RpcInvokeByIds(sId []string, rkey core.Rpc_Key, iscall bool, arg ...interface{}) (results map[string]*base.Result, err error)

func (*ClusterService) RpcInvokeByIp

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

func (*ClusterService) RpcInvokeByIps

func (this *ClusterService) RpcInvokeByIps(sIp []string, sType string, rkey core.Rpc_Key, iscall bool, arg ...interface{}) (results map[string]*base.Result, 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) Run

func (this *ClusterService) Run(mod ...core.IModule)

func (*ClusterService) SetPreWeight

func (this *ClusterService) SetPreWeight(weight int32)

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

func (this *ClusterService) UpDataServiceHandlefunc(node registry.ServiceNode)

更新服务会话 当有新的服务加入时

type Option

type Option func(*Options)

func SetConfPath

func SetConfPath(v string) Option

func SetVersion

func SetVersion(v string) Option

type Options

type Options struct {
	ConfPath string
	Version  string //服务版本
	Setting  core.ServiceSttings
}

Jump to

Keyboard shortcuts

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