center

package
v0.0.0-...-0a83888 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SystemKey    string = "/system"
	BussinessKey string = "/bussiness"
	SwitchKey    string = "/switch"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bussiness

type Bussiness struct {
}

Bussiness 业务数值类配置。

type Engine

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

Engine 处理更新等操作

func New

func New(ctx context.Context, prefix string) *Engine

New is used to instance configure

func (*Engine) Exit

func (e *Engine) Exit()

Exit is used to resource backoff

func (*Engine) GetBussiness

func (e *Engine) GetBussiness() *Bussiness

GetBussiness is used to bussiness's configure

func (*Engine) GetSwitch

func (e *Engine) GetSwitch() *OnOff

GetSwitch is used to switch's configure

func (*Engine) GetSystem

func (e *Engine) GetSystem() *System

GetSystem is used to system's configure

func (*Engine) Watch

func (e *Engine) Watch(client *clientv3.Client) error

Watch is used to listen etcd's change

type OnOff

type OnOff struct {
	DiscountActivity bool `yaml:"discount_activity"`
	AdvActivity      bool `yaml:"adv_activity"`
	LuckDrawActivity bool `yaml:"luck_draw_activity"`
	ChargeActivity   bool `yaml:"charge_activity"`
}

type System

type System struct {
	Mysql string `yaml:"mysql"`
	Redis string `yaml:"redis"`
	Nats  string `yaml:"nats"`
	Nsqd  string `yaml:"nsqd"`
}

Jump to

Keyboard shortcuts

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