serve

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(strategy Strategy) (err error)

Serve 加载策略并执行

func SetupStrategyFromConfig

func SetupStrategyFromConfig(strategy Strategy) (err error)

SetupStrategyFromConfig 根据配置文件设置策略参数

Types

type MyLogger added in v1.1.10

type MyLogger struct {
	Path        string // 文件路径,如:./app.log
	Level       string // 日志输出的级别
	MaxFileSize int    // 日志文件大小的最大值,单位(M)
	MaxBackups  int    // 最多保留备份数
	MaxAge      int    // 日志文件保存的时间,单位(天)
	Compress    bool   // 是否压缩
	Caller      bool   // 日志是否需要显示调用位置
	JsonFormat  bool   // 是否以Json格式输出
	Stdout      bool   // 是否输出到控制台
	// contains filtered or unexported fields
}

func NewMyLogger added in v1.1.10

func NewMyLogger(path string, level string, jsonFormat bool) *MyLogger

func (*MyLogger) Debug added in v1.1.10

func (l *MyLogger) Debug(args ...interface{})

func (*MyLogger) Debugf added in v1.1.10

func (l *MyLogger) Debugf(template string, args ...interface{})

func (*MyLogger) Debugw added in v1.1.10

func (l *MyLogger) Debugw(msg string, keysAndValues ...interface{})

func (*MyLogger) Error added in v1.1.10

func (l *MyLogger) Error(args ...interface{})

func (*MyLogger) Errorf added in v1.1.10

func (l *MyLogger) Errorf(template string, args ...interface{})

func (*MyLogger) Errorw added in v1.1.10

func (l *MyLogger) Errorw(msg string, keysAndValues ...interface{})

func (*MyLogger) Info added in v1.1.10

func (l *MyLogger) Info(args ...interface{})

func (*MyLogger) Infof added in v1.1.10

func (l *MyLogger) Infof(template string, args ...interface{})

func (*MyLogger) Infow added in v1.1.10

func (l *MyLogger) Infow(msg string, keysAndValues ...interface{})

func (*MyLogger) Sync added in v1.1.10

func (l *MyLogger) Sync()

func (*MyLogger) Warn added in v1.1.10

func (l *MyLogger) Warn(args ...interface{})

func (*MyLogger) Warnf added in v1.1.10

func (l *MyLogger) Warnf(template string, args ...interface{})

func (*MyLogger) Warnw added in v1.1.10

func (l *MyLogger) Warnw(msg string, keysAndValues ...interface{})

type SConfig added in v1.1.8

type SConfig struct {
	Log       SLog                   `toml:"log"`
	Exchanges []SExchange            `toml:"exchange"`
	Options   map[string]interface{} `toml:"option"`
}

type SExchange added in v1.1.8

type SExchange struct {
	Name      string `toml:"name"`
	DebugMode bool   `toml:"debug_mode"`
	AccessKey string `toml:"access_key"`
	SecretKey string `toml:"secret_key"`
	Testnet   bool   `toml:"testnet"`
	WebSocket bool   `toml:"websocket"`
}

type SLog added in v1.1.10

type SLog struct {
	Path  string `toml:"path"` // 运行日志
	Level string `toml:"level"`
}

Jump to

Keyboard shortcuts

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