common

package
v0.0.0-...-f05999e Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2018 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertValueToFloat64

func ConvertValueToFloat64(value interface{}) (float64, error)

ConvertValueToFloat64 converts interface value to float64

Types

type ArrFlags

type ArrFlags []string

ArrFlags is custom flat struct for ability to pass array of values(strings)(example: --flag_name="value1" --flag_name="value2")

func (*ArrFlags) AsArray

func (f *ArrFlags) AsArray() []string

AsArray returns values as array

func (*ArrFlags) Set

func (f *ArrFlags) Set(value string) error

Set sets new passed value

func (*ArrFlags) String

func (f *ArrFlags) String() string

String returns joined values through the separator ";"

type Config

type Config struct {
	ListenAddress string
	MetricsPath   string
	Namespace     string
	NginxUrls     []string
	NginxPlusUrls []string
}

Config is the struct of application config.

func NewConfig

func NewConfig(listenAddress string, metricsPath string, namespace string, nginxUrls []string, nginxPlusUrls []string) *Config

NewConfig creates new application config.

Jump to

Keyboard shortcuts

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