config

package
v0.13.4 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Config

type Config struct {
	FinderType                  int    `flag:"type"`
	DataPath                    string `flag:"path"`
	HTTPAddr                    string `flag:"http-addr"`
	RedisAddr                   string `flag:"redis-addr"`
	PrometheusHostPorts         string `flag:"prometheus-host-port"`
	PrometheusPath              string `flag:"prometheus-path"`
	HertzPrometheusHostPorts    string `flag:"hertz-prometheus-host-port"`
	HertzPrometheusPath         string `flag:"hertz-prometheus-path"`
	PrometheusEnableGoCollector bool   `flag:"prometheus-enable-go-coll"`
	DisablePrintRoute           bool   `flag:"disable-print-route"`
}

func NewConfigFromArgs

func NewConfigFromArgs() *Config

func (*Config) Tags

func (*Config) Tags(tag string, convert ...func(string) string) ConfigTags

Tags return specified tags of Config

func (*Config) TagsFlag

func (*Config) TagsFlag() ConfigTags

TagsFlag is alias of Tags("flag")

type ConfigTags

type ConfigTags struct {
	FinderType                  string // `flag:"type"`
	DataPath                    string // `flag:"path"`
	HTTPAddr                    string // `flag:"http-addr"`
	RedisAddr                   string // `flag:"redis-addr"`
	PrometheusHostPorts         string // `flag:"prometheus-host-port"`
	PrometheusPath              string // `flag:"prometheus-path"`
	HertzPrometheusHostPorts    string // `flag:"hertz-prometheus-host-port"`
	HertzPrometheusPath         string // `flag:"hertz-prometheus-path"`
	PrometheusEnableGoCollector string // `flag:"prometheus-enable-go-coll"`
	DisablePrintRoute           string // `flag:"disable-print-route"`
}

ConfigTags indicate tags of type Config

func (*ConfigTags) Values

func (t *ConfigTags) Values() []string

Values return all tags of Config as slice

Jump to

Keyboard shortcuts

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