Version: v0.0.0-...-feac726 Latest Latest

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

Go to latest
Published: Nov 5, 2022 License: MIT Imports: 8 Imported by: 0




This section is empty.


This section is empty.


func ParseDuration

func ParseDuration(value string, target *time.Duration) error

func ParseDurations

func ParseDurations(c *Config) error


type APIConfig

type APIConfig struct {
	Host        string `json:"host"`
	KDGate      int    `json:"kdGate"`
	ArcherGate  int    `json:"archerGate"`
	BuilderGate int    `json:"builderGate"`
	KnightGate  int    `json:"knightGate"`
	NemesisGate int    `json:"nemesisGate"`

func NewAPIConfig

func NewAPIConfig() APIConfig

type Config

type Config struct {
	Name                   string           `json:"name"`
	BatchSize              int              `json:"batchSize"`
	CommitInterval         string           `json:"commitInterval"`
	CommitIntervalDuration time.Duration    `json:"-"`
	DatabaseConnection     string           `json:"databaseConnection"`
	Monitoring             MonitoringConfig `json:"monitoring"`
	Servers                []ServerConfig   `json:"servers"`
	Indexer                IndexerConfig    `json:"indexer"`
	API                    APIConfig        `json:"api"`
	MOTD                   string           `json:"motd"`
	MOTDInterval           string           `json:"motdInterval"`
	MOTDIntervalDuration   time.Duration    `json:"-"`

func Decode

func Decode(r io.Reader) (Config, error)

func Get

func Get() (Config, error)

func NewConfig

func NewConfig() Config

func Read

func Read(path string) (Config, error)

type IndexerConfig

type IndexerConfig struct {
	BatchSize        int           `json:"batchSize"`
	Interval         string        `json:"interval"`
	IntervalDuration time.Duration `json:"-"`

func NewIndexerConfig

func NewIndexerConfig() IndexerConfig

type MonitoringConfig

type MonitoringConfig struct {
	Enabled             bool          `json:"enabled"`
	RefreshRate         string        `json:"refreshRate"`
	RefreshRateDuration time.Duration `json:"-"`
	Host                string        `json:"host"`

func NewMonitoringConfig

func NewMonitoringConfig() MonitoringConfig

type ServerConfig

type ServerConfig struct {
	Tags     []string `json:"tags"`
	Address  string   `json:"address"`
	Port     string   `json:"port"`
	Password string   `json:"password"`

func (ServerConfig) TagsString

func (s ServerConfig) TagsString() string

Source Files

Jump to

Keyboard shortcuts

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