config

package
v0.0.0-...-093acf2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Service struct {
		Name          string        `json:"name" default:"crypto-collector"`
		LogStatPeriod time.Duration `json:"log_stat_period" default:"1m"`
		EnableUSD     bool          `json:"enable_usd"`
		AverageWindow int           `json:"average_window"`
	} `json:"service"`
	Zap struct {
		//debug, info, warn, error, fatal, panic
		Level string `json:"level" default:"info"`
		//console, json
		Encoding string `json:"encoding" default:"console"`
		//disable, short, full
		Caller string `json:"caller" default:"short"`
	} `json:"zap"`
	Binance struct {
		Name   string `json:"name" default:"binance"`
		WsHost string `json:"ws_host" default:"wss://stream.binance.com:9443/stream?streams="`
		Debug  bool   `json:"debug" default:"false"`
	} `json:"binance"`
	Ftx struct {
		Name   string `json:"name" default:"ftx"`
		WsHost string `json:"ws_host" default:"wss://ftx.com/ws/"`
	} `json:"fxt"`

	Ws struct {
		ConnTimeout time.Duration `json:"conn_timeout" default:"5s"`
	} `json:"ws"`
	Nats struct {
		Host string `json:"host"`
		Port string `json:"port"`
	} `json:"nats"`
	Markets []string `json:"markets"`
}

func NewConfig

func NewConfig() *Config

Jump to

Keyboard shortcuts

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