123456789101112131415161718192021222324252627282930313233343536373839 |
- package config
- import "eta/eta_mini_ht_api/common/contants"
- // ESOpts es连接属性
- type HTOpts struct {
- ReportIndex string
- MediaIndex string
- }
- type HTBizConfig struct {
- BaseConfig
- opts HTOpts
- }
- func (e *HTBizConfig) GetReportIndex() string {
- return e.opts.ReportIndex
- }
- func (e *HTBizConfig) GetMediaIndex() string {
- return e.opts.MediaIndex
- }
- func (e *HTBizConfig) InitConfig() {
- opts := HTOpts{
- ReportIndex: e.GetString("es_report_index"),
- MediaIndex: e.GetString("es_media_index"),
- }
- e.opts = opts
- }
- func NewHT() Config {
- return &HTBizConfig{
- BaseConfig: BaseConfig{prefix: contants.HT},
- opts: HTOpts{},
- }
- }
- func init() {
- Register(contants.HT, NewHT)
- }
|