Documentation ¶
Index ¶
- Variables
- func Register(identifier string, resolver IServerResolver)
- func Trace(print func(f string, args ...interface{}), args ...interface{})
- func TraceIf(b bool, okPrint func(f string, args ...interface{}), ...)
- func Tracef(print func(f string, args ...interface{}), format string, args ...interface{})
- type IExecuteHandler
- type IExecuter
- type IRegistryEngine
- type IRegistryServer
- type IServerResolver
- type IServerResolverHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ST_RUNNING = "running" ST_STOP = "stop" ST_PAUSE = "pause" SRV_TP_API = "api" SRV_FILE_API = "file" SRV_TP_RPC = "rpc" SRV_TP_CRON = "cron" SRV_TP_MQ = "mq" SRV_TP_WEB = "web" )
View Source
var IsDebug = false
Functions ¶
func Trace ¶
func Trace(print func(f string, args ...interface{}), args ...interface{})
Trace 打印跟踪信息
Types ¶
type IExecuteHandler ¶
func (IExecuteHandler) Execute ¶
func (i IExecuteHandler) Execute(ctx *context.Context) (rs interface{})
type IRegistryEngine ¶
type IRegistryEngine interface { context.IContainer IExecuter GetComponent() component.IComponent SetHandler(h component.IComponentHandler) error UpdateVarConf(conf conf.IServerConf) GetServices() map[string][]string Fallback(c *context.Context) (rs interface{}) }
IRegistryEngine 基于注册中心的执行引擎
type IRegistryServer ¶
type IRegistryServer interface { Notify(conf.IServerConf) error Start() error GetAddress() string GetServices() map[string][]string Restarted() bool GetStatus() string Shutdown() }
IRegistryServer 基于注册中心的服务器
func NewRegistryServer ¶
func NewRegistryServer(identifier string, registryAddr string, conf conf.IServerConf, log *logger.Logger) (IRegistryServer, error)
NewRegistryServer 根据服务标识创建服务器
type IServerResolver ¶
type IServerResolver interface {
Resolve(registryAddr string, conf conf.IServerConf, log *logger.Logger) (IRegistryServer, error)
}
IServerResolver 服务器生成器
type IServerResolverHandler ¶
type IServerResolverHandler func(registryAddr string, conf conf.IServerConf, log *logger.Logger) (IRegistryServer, error)
func (IServerResolverHandler) Resolve ¶
func (i IServerResolverHandler) Resolve(registryAddr string, conf conf.IServerConf, log *logger.Logger) (IRegistryServer, error)
Resolve 创建服务器实例
Click to show internal directories.
Click to hide internal directories.