flags

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package flags defines command line flags that are shared by several jaeger components. They are defined in this shared location so that if several components are wired into a single binary (e.g. a local container of complete Jaeger backend) they can all share the flags.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddConfigFileFlag

func AddConfigFileFlag(flagSet *flag.FlagSet)

AddConfigFileFlag adds flags for ExternalConfFlags

func AddFlags

func AddFlags(flagSet *flag.FlagSet)

AddFlags adds flags for SharedFlags

func AddLoggingFlag

func AddLoggingFlag(flagSet *flag.FlagSet)

AddLoggingFlag adds logging flag for SharedFlags

func SetDefaultHealthCheckPort

func SetDefaultHealthCheckPort(port int)

SetDefaultHealthCheckPort sets the default port for health check. Must be called before AddFlags

func TryLoadConfigFile

func TryLoadConfigFile(v *viper.Viper) error

TryLoadConfigFile initializes viper with config file specified as flag

Types

type SharedFlags

type SharedFlags struct {
	// Logging holds logging configuration
	Logging logging
	// HealthCheck holds health check configuration
	HealthCheck healthCheck
}

SharedFlags holds flags configuration

func (*SharedFlags) InitFromViper

func (flags *SharedFlags) InitFromViper(v *viper.Viper) *SharedFlags

InitFromViper initializes SharedFlags with properties from viper

func (*SharedFlags) NewHealthCheck

func (flags *SharedFlags) NewHealthCheck(logger *zap.Logger) (*hc.HealthCheck, error)

NewHealthCheck returns health check based on configuration in SharedFlags

func (*SharedFlags) NewLogger

func (flags *SharedFlags) NewLogger(conf zap.Config, options ...zap.Option) (*zap.Logger, error)

NewLogger returns logger based on configuration in SharedFlags

Jump to

Keyboard shortcuts

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