starters

package
v0.0.0-...-1bf86c4 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const AppConfigScope = "app"
View Source
const AppInitHookTag = "hooks.AppInit"
View Source
const AppPortTag = "app.port"
View Source
const DefAppPort = "8080"
View Source
const MysqlConfigPrefix = "mysql"
View Source
const MysqlConnectorId = "mysql.connector"
View Source
const MysqlDriverName = "mysql"

Variables

This section is empty.

Functions

func GetMysqlConnectionLink(conf Base.ConfigureFace) string

func NewGormDb

func NewGormDb(conf Base.ConfigureFace, url ...string) *gorm.DB

func NewIrisApp

func NewIrisApp() *iris.Application

func NewIrisStarter

func NewIrisStarter() Base.IStarter

func NewMysqlStarter

func NewMysqlStarter() Base.IStarter

Types

type AppInitHook

type AppInitHook func(*iris.Application, Base.ICtxContainer)

type EtcdStarter

type EtcdStarter struct {
}

func (*EtcdStarter) Block

func (e *EtcdStarter) Block() bool

func (*EtcdStarter) Destroy

func (e *EtcdStarter) Destroy()

func (*EtcdStarter) Init

func (e *EtcdStarter) Init()

func (*EtcdStarter) Register

func (e *EtcdStarter) Register(container Base.ICtxContainer)

func (*EtcdStarter) Start

func (e *EtcdStarter) Start()

func (*EtcdStarter) Stop

func (e *EtcdStarter) Stop()

type GormDbConfigWrapper

type GormDbConfigWrapper struct {
	Url  string
	Conf Base.ConfigureFace
}

配置缓存

func NewGormDbWrapper

func NewGormDbWrapper(conf Base.ConfigureFace) *GormDbConfigWrapper

type IDataBaseConnector

type IDataBaseConnector interface {
	Connection(name ...string) *gorm.DB
}

func GetMysqlGormConnectorInstance

func GetMysqlGormConnectorInstance(config ...Base.ConfigureFace) IDataBaseConnector

func NewMysqlGormConnector

func NewMysqlGormConnector(ctx ...Base.ConfigureFace) IDataBaseConnector

type IRedisConnector

type IRedisConnector interface {
	Connection(name ...string)
}

type IrisStarter

type IrisStarter struct {
	Engine *iris.Application
	Ctx    Base.ICtxContainer
}

func (*IrisStarter) Block

func (i *IrisStarter) Block() bool

func (*IrisStarter) Destroy

func (i *IrisStarter) Destroy()

func (*IrisStarter) Init

func (i *IrisStarter) Init()

func (*IrisStarter) Register

func (i *IrisStarter) Register(ctx Base.ICtxContainer)

func (*IrisStarter) Start

func (i *IrisStarter) Start()

func (*IrisStarter) Stop

func (i *IrisStarter) Stop()

type MysqlGormConnector

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

链接获取器

func (*MysqlGormConnector) Close

func (m *MysqlGormConnector) Close(name ...string)

func (*MysqlGormConnector) Connection

func (m *MysqlGormConnector) Connection(names ...string) *gorm.DB

func (*MysqlGormConnector) Destroy

func (m *MysqlGormConnector) Destroy(name ...string)

func (*MysqlGormConnector) Init

func (m *MysqlGormConnector) Init()

func (*MysqlGormConnector) Stop

func (m *MysqlGormConnector) Stop()

type RabbitMqStarter

type RabbitMqStarter struct {
}

func (*RabbitMqStarter) Block

func (r *RabbitMqStarter) Block() bool

func (*RabbitMqStarter) Destroy

func (r *RabbitMqStarter) Destroy()

func (*RabbitMqStarter) Init

func (r *RabbitMqStarter) Init()

func (*RabbitMqStarter) Register

func (r *RabbitMqStarter) Register(container Base.ICtxContainer)

func (*RabbitMqStarter) Start

func (r *RabbitMqStarter) Start()

func (*RabbitMqStarter) Stop

func (r *RabbitMqStarter) Stop()

type RedisStarter

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

func (*RedisStarter) Block

func (r *RedisStarter) Block() bool

func (*RedisStarter) Destroy

func (r *RedisStarter) Destroy()

func (*RedisStarter) Init

func (r *RedisStarter) Init()

func (*RedisStarter) Register

func (r *RedisStarter) Register(container Base.ICtxContainer)

func (*RedisStarter) Start

func (r *RedisStarter) Start()

func (*RedisStarter) Stop

func (r *RedisStarter) Stop()

Jump to

Keyboard shortcuts

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