Documentation
¶
Index ¶
- func Translate(format string, data map[string]string) string
- type ApiBinder
- func (b ApiBinder) SetAuthes(a *conf.Authes)
- func (b ApiBinder) SetCircuitBreaker(c *conf.CircuitBreaker)
- func (b *ApiBinder) SetCrossDomain()
- func (b ApiBinder) SetHeaders(h conf.Headers)
- func (b *ApiBinder) SetMain(c *conf.APIServerConf)
- func (b *ApiBinder) SetResponse(h *conf.Response)
- func (b ApiBinder) SetRouters(r *conf.Routers)
- func (b *ApiBinder) SetStatic(c *conf.Static)
- type Binder
- func (s *Binder) Confirm(msg string) bool
- func (s *Binder) GetInput() map[string]*Input
- func (s *Binder) GetInstallers(serverType string) []func(c component.IContainer) error
- func (s *Binder) GetMainConf(serverType string) string
- func (s *Binder) GetMainConfNames(platName string, systemName string, tp string, clusterName string) []string
- func (s *Binder) GetMainConfScanNum(serverType string) int
- func (s *Binder) GetOrSet(tp string) IExtBinder
- func (s *Binder) GetSQL(dir string) ([]string, error)
- func (s *Binder) GetSubConf(serverType string, subName string) string
- func (s *Binder) GetSubConfNames(serverType string) []string
- func (s *Binder) GetSubConfScanNum(serverType string, subName string) int
- func (s *Binder) GetVarConf(nodeName string) string
- func (s *Binder) GetVarConfNames() []string
- func (s *Binder) GetVarConfScanNum(nodeName string) int
- func (s *Binder) Print()
- func (s *Binder) ScanMainConf(mainPath string, serverType string) error
- func (s *Binder) ScanSubConf(mainPath string, serverType string, subName string) error
- func (s *Binder) ScanVarConf(platName string, nodeName string) error
- func (s *Binder) SetInput(fieldName, showName, desc string, filters ...func(v string) (string, error))
- func (s *Binder) SetParam(k, v string)
- type Creator
- type CronBinder
- func (c CronBinder) Installer(f func(c component.IContainer) error)
- func (c CronBinder) SetApp(m interface{})
- func (b *CronBinder) SetMain(c *conf.CronServerConf)
- func (c CronBinder) SetMainConf(input interface{})
- func (c CronBinder) SetMetric(m *conf.Metric)
- func (c CronBinder) SetSubConf(n string, input interface{})
- func (b *CronBinder) SetTasks(c *conf.Tasks)
- type ExtBinder
- type IApiBinder
- type IBinder
- type ICronBinder
- type IExtBinder
- type IMQCBinder
- type IPlatBinder
- type IRPCBinder
- type IWSBinder
- type IWebBinder
- type Input
- type MQCBinder
- func (c MQCBinder) Installer(f func(c component.IContainer) error)
- func (c MQCBinder) SetApp(m interface{})
- func (b *MQCBinder) SetMain(c *conf.MQCServerConf)
- func (c MQCBinder) SetMainConf(input interface{})
- func (c MQCBinder) SetMetric(m *conf.Metric)
- func (b *MQCBinder) SetQueues(c *conf.Queues)
- func (b *MQCBinder) SetServer(c conf.QueueConf)
- func (c MQCBinder) SetSubConf(n string, input interface{})
- type PlatBinder
- func (b *PlatBinder) SetCache(d conf.CacheConf)
- func (b *PlatBinder) SetCacheByName(name string, d conf.CacheConf)
- func (b *PlatBinder) SetDB(d *conf.DBConf)
- func (b *PlatBinder) SetDBByName(name string, d *conf.DBConf)
- func (b *PlatBinder) SetQueue(d conf.QueueConf)
- func (b *PlatBinder) SetQueueByName(name string, d conf.QueueConf)
- func (c PlatBinder) SetVarConf(t string, s string, input interface{})
- type RpcBinder
- type WSBinder
- type WebBinder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ApiBinder ¶
type ApiBinder struct {
// contains filtered or unexported fields
}
func NewApiBinder ¶
func (ApiBinder) SetCircuitBreaker ¶
func (b ApiBinder) SetCircuitBreaker(c *conf.CircuitBreaker)
func (*ApiBinder) SetCrossDomain ¶
func (b *ApiBinder) SetCrossDomain()
func (ApiBinder) SetHeaders ¶
func (*ApiBinder) SetMain ¶
func (b *ApiBinder) SetMain(c *conf.APIServerConf)
func (*ApiBinder) SetResponse ¶
func (ApiBinder) SetRouters ¶
type Binder ¶
type Binder struct {
API IApiBinder
RPC IRPCBinder
WS IWSBinder
WEB IWebBinder
MQC IMQCBinder
CRON ICronBinder
Plat IPlatBinder
Log logger.ILogging
// contains filtered or unexported fields
}
func (*Binder) GetInstallers ¶
func (s *Binder) GetInstallers(serverType string) []func(c component.IContainer) error
func (*Binder) GetMainConf ¶
GetMainConf 获取主配置信息
func (*Binder) GetMainConfNames ¶
func (s *Binder) GetMainConfNames(platName string, systemName string, tp string, clusterName string) []string
GetMainConfNames 获取已配置的主配置名称
func (*Binder) GetMainConfScanNum ¶
GetMainConfScanNum 获取主配置待扫描参数个数
func (*Binder) GetOrSet ¶
func (s *Binder) GetOrSet(tp string) IExtBinder
func (*Binder) GetSubConf ¶
GetSubConf 获取子配置信息
func (*Binder) GetSubConfNames ¶
GetSubConfNames 获取已配置的主配置名称
func (*Binder) GetSubConfScanNum ¶
GetSubConfScanNum 获取子配置待扫描参数个数
func (*Binder) GetVarConfNames ¶
GetVarConfNames 获取已配置的主配置名称
func (*Binder) GetVarConfScanNum ¶
GetVarConfScanNum 获取var配置待扫描参数个数
func (*Binder) ScanMainConf ¶
ScanMainConf 扫描主配置
func (*Binder) ScanSubConf ¶
ScanSubConf 扫描子配置
func (*Binder) ScanVarConf ¶
ScanVarConf 扫描平台配置
type Creator ¶
type Creator struct {
// contains filtered or unexported fields
}
Creator 配置文件创建器
type CronBinder ¶
type CronBinder struct {
// contains filtered or unexported fields
}
func (CronBinder) Installer ¶
func (c CronBinder) Installer(f func(c component.IContainer) error)
func (*CronBinder) SetMain ¶
func (b *CronBinder) SetMain(c *conf.CronServerConf)
func (CronBinder) SetMainConf ¶
func (c CronBinder) SetMainConf(input interface{})
SetMainConf 设置主配置内容
func (CronBinder) SetSubConf ¶
func (c CronBinder) SetSubConf(n string, input interface{})
SetSubConf 设置子配置内容
func (*CronBinder) SetTasks ¶
func (b *CronBinder) SetTasks(c *conf.Tasks)
type ExtBinder ¶
type ExtBinder struct {
// contains filtered or unexported fields
}
func NewExtBinder ¶
func (ExtBinder) SetCircuitBreaker ¶
func (b ExtBinder) SetCircuitBreaker(c *conf.CircuitBreaker)
func (ExtBinder) SetHeaders ¶
func (ExtBinder) SetRouters ¶
type IApiBinder ¶
type IBinder ¶
type IBinder interface {
GetMainConfNames(platName string, systemName string, tp string, clusterName string) []string
GetSubConfNames(serverType string) []string
GetVarConfNames() []string
ScanMainConf(mainPath string, serverType string) error
ScanSubConf(mainPath string, serverType string, subName string) error
ScanVarConf(platName string, nodeName string) error
GetMainConf(serverType string) string
GetSubConf(serverType string, subName string) string
GetVarConf(nodeName string) string
GetMainConfScanNum(serverType string) int
GetSubConfScanNum(serverType string, subName string) int
GetVarConfScanNum(nodeName string) int
GetInstallers(serverType string) []func(c component.IContainer) error
GetSQL(dir string) ([]string, error)
GetInput() map[string]*Input
SetParam(k, v string)
Confirm(msg string) bool
Print()
}
type ICronBinder ¶
type ICronBinder interface {
SetMain(*conf.CronServerConf)
SetTasks(*conf.Tasks)
IExtBinder
}
type IExtBinder ¶
type IMQCBinder ¶
type IMQCBinder interface {
SetMain(*conf.MQCServerConf)
SetServer(conf.QueueConf)
SetQueues(*conf.Queues)
IExtBinder
}
type IPlatBinder ¶
type IRPCBinder ¶
type IRPCBinder interface {
SetMain(c *conf.RPCServerConf)
// contains filtered or unexported methods
}
type IWSBinder ¶
type IWSBinder interface {
SetMain(*conf.WSServerConf)
// contains filtered or unexported methods
}
type IWebBinder ¶
type IWebBinder interface {
SetStatic(*conf.Static)
SetMain(*conf.WebServerConf)
// contains filtered or unexported methods
}
type MQCBinder ¶
type MQCBinder struct {
// contains filtered or unexported fields
}
func NewMQCBinder ¶
func (MQCBinder) Installer ¶
func (c MQCBinder) Installer(f func(c component.IContainer) error)
func (*MQCBinder) SetMain ¶
func (b *MQCBinder) SetMain(c *conf.MQCServerConf)
func (MQCBinder) SetMainConf ¶
func (c MQCBinder) SetMainConf(input interface{})
SetMainConf 设置主配置内容
func (MQCBinder) SetSubConf ¶
func (c MQCBinder) SetSubConf(n string, input interface{})
SetSubConf 设置子配置内容
type PlatBinder ¶
type PlatBinder struct {
// contains filtered or unexported fields
}
func NewPlatBinder ¶
func NewPlatBinder(params map[string]string, inputs map[string]*Input) *PlatBinder
func (*PlatBinder) SetCache ¶
func (b *PlatBinder) SetCache(d conf.CacheConf)
func (*PlatBinder) SetCacheByName ¶
func (b *PlatBinder) SetCacheByName(name string, d conf.CacheConf)
func (*PlatBinder) SetDB ¶
func (b *PlatBinder) SetDB(d *conf.DBConf)
func (*PlatBinder) SetDBByName ¶
func (b *PlatBinder) SetDBByName(name string, d *conf.DBConf)
func (*PlatBinder) SetQueue ¶
func (b *PlatBinder) SetQueue(d conf.QueueConf)
func (*PlatBinder) SetQueueByName ¶
func (b *PlatBinder) SetQueueByName(name string, d conf.QueueConf)
func (PlatBinder) SetVarConf ¶
SetVarConf 设置var配置内容
type RpcBinder ¶
type RpcBinder struct {
// contains filtered or unexported fields
}
func NewRpcBinder ¶
func (RpcBinder) SetCircuitBreaker ¶
func (b RpcBinder) SetCircuitBreaker(c *conf.CircuitBreaker)
func (RpcBinder) SetHeaders ¶
func (*RpcBinder) SetMain ¶
func (b *RpcBinder) SetMain(c *conf.RPCServerConf)
func (RpcBinder) SetRouters ¶
type WSBinder ¶
type WSBinder struct {
// contains filtered or unexported fields
}
func (WSBinder) SetCircuitBreaker ¶
func (b WSBinder) SetCircuitBreaker(c *conf.CircuitBreaker)
func (WSBinder) SetHeaders ¶
func (*WSBinder) SetMain ¶
func (b *WSBinder) SetMain(c *conf.WSServerConf)
func (WSBinder) SetRouters ¶
type WebBinder ¶
type WebBinder struct {
// contains filtered or unexported fields
}
func NewWebBinder ¶
func (WebBinder) SetCircuitBreaker ¶
func (b WebBinder) SetCircuitBreaker(c *conf.CircuitBreaker)
func (WebBinder) SetHeaders ¶
func (*WebBinder) SetMain ¶
func (b *WebBinder) SetMain(c *conf.WebServerConf)
func (WebBinder) SetRouters ¶
Click to show internal directories.
Click to hide internal directories.