dent

package
v0.1.69 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: LGPL-2.1 Imports: 20 Imported by: 0

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  = _distEntitiesEventTabId + 0
	EventDistEntityOfflineId = _distEntitiesEventTabId + 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 DistEntitiesOptions

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

DistEntitiesOptions 所有选项

type EventDistEntityOffline

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

EventDistEntityOffline 事件:分布式实体下线

type EventDistEntityOfflineHandler added in v0.1.44

type EventDistEntityOfflineHandler func(entity ec.Entity)

func HandleEventDistEntityOffline added in v0.1.44

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

func (EventDistEntityOfflineHandler) OnDistEntityOffline added in v0.1.44

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

type EventDistEntityOnline

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

EventDistEntityOnline 事件:分布式实体上线

type EventDistEntityOnlineHandler added in v0.1.44

type EventDistEntityOnlineHandler func(entity ec.Entity)

func HandleEventDistEntityOnline added in v0.1.44

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

func (EventDistEntityOnlineHandler) OnDistEntityOnline added in v0.1.44

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

type IDistEntities

type IDistEntities interface {
	IDistEntitiesEventTab
}

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

type IDistEntitiesEventTab

type IDistEntitiesEventTab 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