context

package
v0.0.0-...-84fae08 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2020 License: MIT Imports: 15 Imported by: 3

Documentation

Index

Constants

View Source
const (
	SIGUSR1 = syscall.Signal(0x1e)
	SIGUSR2 = syscall.Signal(0x1f)
)

Variables

This section is empty.

Functions

func InitDatasource

func InitDatasource(f reflect.StoreFunction) (string, interface{})

Types

type ApplicationContext

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

func (*ApplicationContext) AddProcessFunction

func (this *ApplicationContext) AddProcessFunction(p ...InitProcessFunction)

func (*ApplicationContext) Finish

func (this *ApplicationContext) Finish()

结束加载

func (*ApplicationContext) GetService

func (this *ApplicationContext) GetService(name string) interface{}

func (*ApplicationContext) Inject

func (this *ApplicationContext) Inject(c interface{}) error

组装对象

func (*ApplicationContext) RegisterService

func (this *ApplicationContext) RegisterService(name string, service interface{})

type BeanAutoInit

type BeanAutoInit interface {
	AutoInit() error
}

Bean自动初始化接口

type Boot

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

func (*Boot) Init

func (this *Boot) Init(d Dispatch, lfunc ...OnBootLoad)

func (*Boot) Start

func (this *Boot) Start()

func (*Boot) StartByConfig

func (this *Boot) StartByConfig(config Config)

func (*Boot) StartByConfigFile

func (this *Boot) StartByConfigFile(filename string)

type Config

type Config interface {
	//获取属性
	GetProperty(key string) string
	//获取自定义属性
	GetPropertyForCustom(key string) string
}

type Dispatch

type Dispatch interface {
	ConfigPort(p int)
	ConfigStatic(root string)
	ConfigTemplate(root string, suffix string)
	AddRequestMapperBystruct(target interface{})
	AddRequestMapperByHandleFunction(name string, url []string, input interface{}, handle bingo_mvc.HandleFunction, methods []bingo_mvc.HttpMethodType)
	Run()
}

*

启动包装类,用于简单启动系统

load函数,如果加载成功返回true,否则返回FALSE

type InitProcessFunction

type InitProcessFunction func(f container.StoreFunction) (string, interface{})

初始化函数

type OnBootLoad

type OnBootLoad func() []interface{}

type OnDestoryHandler

type OnDestoryHandler func() bool //shutdown的handler,用于处理关闭服务的自定义动作

type YamlConfig

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

func (*YamlConfig) GetProperty

func (this *YamlConfig) GetProperty(key string) string

func (*YamlConfig) GetPropertyForCustom

func (this *YamlConfig) GetPropertyForCustom(key string) string

不能获取bingo自身的属性,只能获取应用自身的扩展属性

func (*YamlConfig) LoadFromFile

func (this *YamlConfig) LoadFromFile(file string)

Jump to

Keyboard shortcuts

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