dentr

package
v0.2.16 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: LGPL-2.1 Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Name      = self.Name
	Using     = self.Using
	Install   = self.Install
	Uninstall = self.Uninstall
)
View Source
var (
	EventDistEntityOnlineId  = _distEntityRegistryEventTabId + 0
	EventDistEntityOfflineId = _distEntityRegistryEventTabId + 1
)
View Source
var With _Option

Functions

func BindEventDistEntityOffline

func BindEventDistEntityOffline(auto iAutoEventDistEntityOffline, subscriber EventDistEntityOffline, priority ...int32) event.Hook

func BindEventDistEntityOnline

func BindEventDistEntityOnline(auto iAutoEventDistEntityOnline, subscriber EventDistEntityOnline, priority ...int32) event.Hook

Types

type DistEntityRegistryOptions

type DistEntityRegistryOptions struct {
	EtcdClient      *clientv3.Client
	EtcdConfig      *clientv3.Config
	KeyPrefix       string
	TTL             time.Duration
	CustomUsername  string
	CustomPassword  string
	CustomAddresses []string
	CustomTLSConfig *tls.Config
}

DistEntityRegistryOptions 所有选项

type EventDistEntityOffline

type EventDistEntityOffline interface {
	OnDistEntityOffline(entity ec.Entity)
}

EventDistEntityOffline 事件:分布式实体下线

type EventDistEntityOfflineHandler

type EventDistEntityOfflineHandler func(entity ec.Entity)

func HandleEventDistEntityOffline

func HandleEventDistEntityOffline(fun func(entity ec.Entity)) EventDistEntityOfflineHandler

func (EventDistEntityOfflineHandler) OnDistEntityOffline

func (h EventDistEntityOfflineHandler) OnDistEntityOffline(entity ec.Entity)

type EventDistEntityOnline

type EventDistEntityOnline interface {
	OnDistEntityOnline(entity ec.Entity)
}

EventDistEntityOnline 事件:分布式实体上线

type EventDistEntityOnlineHandler

type EventDistEntityOnlineHandler func(entity ec.Entity)

func HandleEventDistEntityOnline

func HandleEventDistEntityOnline(fun func(entity ec.Entity)) EventDistEntityOnlineHandler

func (EventDistEntityOnlineHandler) OnDistEntityOnline

func (h EventDistEntityOnlineHandler) OnDistEntityOnline(entity ec.Entity)

type IDistEntityRegistry

type IDistEntityRegistry interface {
	IDistEntityRegistryEventTab
}

IDistEntityRegistry 分布式实体注册支持,会将全局可以访问的实体注册为分布式实体

type IDistEntityRegistryEventTab

type IDistEntityRegistryEventTab interface {
	EventDistEntityOnline() event.IEvent
	EventDistEntityOffline() event.IEvent
}

Jump to

Keyboard shortcuts

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