Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Version current version - semantic format Version string // BuildTime time of the build BuildTime string )
var Log = log.WithField("appname", "nsq-traefik-consumer")
Functions ¶
func Flatten ¶ added in v1.0.3
Flatten takes a structure and turns into a flat map[string]string.
Within the "thing" parameter, only primitive values are allowed. Structs are not supported. Therefore, it can only be slices, maps, primitives, and any combination of those together.
See the tests for examples of what inputs are turned into.
func ServeStats ¶ added in v0.6.0
func ServeStats()
Types ¶
type Config ¶
type Config struct { Nsq NsqConfig LogLevel string LogAsJson bool Kubernetes KubernetesConfig InfluxDB InfluxDbConfig Rules []RulesConfig Fields []string }
type InfluxDbConfig ¶
type KubernetesConfig ¶
type KubernetesConfig struct {
AnnotationKey string
}
type NSQLogrusLogger ¶
type NSQLogrusLogger struct{}
NSQLogrusLogger is an adaptor between the weird go-nsq Logger and our standard logrus logger.
func NewNSQLogrusLogger ¶
func NewNSQLogrusLogger() (logger NSQLogrusLogger, level nsq.LogLevel)
NewNSQLogrusLogger returns a new NSQLogrusLogger and the current log level. This is a format to easily plug into nsq.SetLogger.
func NewNSQLogrusLoggerAtLevel ¶
func NewNSQLogrusLoggerAtLevel(l log.Level) (logger NSQLogrusLogger, level nsq.LogLevel)
NewNSQLogrusLoggerAtLevel returns a new NSQLogrusLogger with the provided log level mapped to nsq.LogLevel for easily plugging into nsq.SetLogger.
type RulesConfig ¶
type VersionInfo ¶
VersionInfo holds the information about current app version
func GetCurrentVersion ¶
func GetCurrentVersion() VersionInfo
GetCurrentVersion returns information about current version of the app
func (VersionInfo) String ¶
func (v VersionInfo) String() string