app

package
v0.0.0-...-b6b8bdf Latest Latest
Warning

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

Go to latest
Published: May 2, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Shtudown = "shutdown"
)

Variables

View Source
var AppStats = &appStats{}

Functions

func NewAppEvent

func NewAppEvent(event string, data interface{}) *appEvent

func NewAutoLoadConfig

func NewAutoLoadConfig() *autoLoadConfig

Types

type Application

type Application struct {
	// contains filtered or unexported fields
}

func NewApplication

func NewApplication() *Application

func (*Application) Build

func (this *Application) Build(builder gioc.IBeanContainerBuilder) gioc.IBeanContainer

func (*Application) ConnectEvent

func (this *Application) ConnectEvent(event string, processor func(string, interface{}))

func (*Application) InitBaseBeanBuilder

func (this *Application) InitBaseBeanBuilder(builder gioc.IBeanContainerBuilder, configLoader gioc.IConfigLoader)

func (*Application) InitBuilder

func (this *Application) InitBuilder() gioc.IBeanContainerBuilder

func (*Application) InitCli

func (this *Application) InitCli() gioc.IConfigLoader

func (*Application) InitClusterMqBuilder

func (this *Application) InitClusterMqBuilder(builder gioc.IBeanContainerBuilder, cfgBase, ctlGroup string,
	encoder gproto.IEncoder, decoder gproto.IDecoder, eventRoute gproto.IRouteDelegate,
	dataRoute gproto.IRouteDelegate)

func (*Application) IsShutdown

func (this *Application) IsShutdown() bool

func (*Application) Shutdown

func (this *Application) Shutdown()

func (*Application) Start

func (this *Application) Start(container gioc.IBeanContainer)

func (*Application) TriggerEvent

func (this *Application) TriggerEvent(event string, data interface{})

type IApplication

type IApplication interface {
	// 是否已关闭
	IsShutdown() bool
	// 触发事件
	TriggerEvent(event string, data interface{})
	// 设置事件处理函数,非线程安全,需要在bean初始化期间全部设置完成
	ConnectEvent(event string, processor func(string, interface{}))
}

应用程序

type RuntimeStats

type RuntimeStats struct {
	// 累积GC暂停时间
	PauseTotal int64
	// 最近一次GC暂停时间
	LastPause int64
	// 协程数量
	NumGoroutine int
	// CPU数
	NumCpu int
	// CGO 调用次数
	NumCgoCall int64
}

Jump to

Keyboard shortcuts

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