config

package
v0.0.0-...-a7236c8 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2022 License: Apache-2.0 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        `default:"ntp-service" json:"name"`
		SyncPeriod time.Duration `default:"1m" json:"sync_period"`
		CheckOnly  bool          `json:"check_only" default:"false"`
		Hosts      []string      `default:"time.apple.com,time.cloudflare.com,time.google.com,time.facebook.com" json:"hosts"`
	} `json:"service"`
	Zap struct {
		//debug, info, warn, error, fatal, panic
		Level string `default:"info" json:"level"`
		//console, json
		Encoding string `default:"console" json:"encoding"`
		//disable, short, full
		Caller string `default:"disable" json:"caller"`
	} `json:"zap"`
}

func NewConfig

func NewConfig() *Config

Jump to

Keyboard shortcuts

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