core

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 11 Imported by: 7

Documentation

Index

Constants

View Source
const (
	HOOK_BEFORE_START int = iota
	HOOK_AFTER_STOP
	HOOK_MAX
)
View Source
const (
	ObjId_RootId int = iota
	ObjId_CoreId
	ObjId_ExecutorId
	ObjId_TimerId
	ObjId_ProfileId
)

Variables

View Source
var Config = Configuration{}

Functions

func BuildTime

func BuildTime() string

func ClosePackages

func ClosePackages()

ClosePackages 关闭功能包

func CoreObject

func CoreObject() *basic.Object

func ExecuteHook

func ExecuteHook(hookpos int) error

func IsPackageLoaded

func IsPackageLoaded(name string) bool

IsPackageLoaded 判断功能包是否已经加载

func IsPackageRegistered

func IsPackageRegistered(name string) bool

IsPackageRegistered 判断功能包是否已经注册

func LaunchChild

func LaunchChild(o *basic.Object)

func LoadPackages

func LoadPackages(configFile string)

LoadPackages 加载功能包

func RegisteHook

func RegisteHook(hookpos int, f hookfunc)

func RegistePackage

func RegistePackage(p Package)

RegistePackage 注册功能包

func RegisterConfigEncryptor

func RegisterConfigEncryptor(h viperx.ConfigFileEncryptorHook)

RegisterConfigEncryptor 注册配置文件加密器

func Terminate

func Terminate(o *basic.Object)

func WritePid

func WritePid()

Types

type Configuration

type Configuration struct {
	MaxProcs int
	Debug    bool
}

func (*Configuration) Close

func (c *Configuration) Close() error

func (*Configuration) Init

func (c *Configuration) Init() error

func (*Configuration) Name

func (c *Configuration) Name() string

type Ctx

type Ctx struct {
	*basic.Object
	CoreObj *basic.Object
}
var (
	AppCtx *Ctx = newCtx()
)

type Package

type Package interface {
	Name() string
	Init() error
	io.Closer
}

Package 功能包 只做初始化,不要依赖其它功能包

Directories

Path Synopsis
Package broker is an interface used for asynchronous messaging
Package broker is an interface used for asynchronous messaging
rabbitmq
Package rabbitmq provides a RabbitMQ broker
Package rabbitmq provides a RabbitMQ broker
builtin
filter
sessionfiltertrace
sessionfiltertrace
queue
queue
queue
recycler
recycler
recycler
skiplist
Package skiplist implements skip list based maps and sets.
Package skiplist implements skip list based maps and sets.
config
config
tcpkeepalive
Package tcpkeepalive implements additional TCP keepalive control beyond what is currently offered by the net pkg.
Package tcpkeepalive implements additional TCP keepalive control beyond what is currently offered by the net pkg.
signal
signal
config
config
AtomicIdGen
AtomicIdGen

Jump to

Keyboard shortcuts

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