cmd

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2019 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(cmd *cobra.Command)

AddFlags adds flags to command

func Execute

func Execute(setters ...Option)

Execute executes command with options

func ReadConfig

func ReadConfig(defaultCfg map[string]interface{}, flags *pflag.FlagSet) (common.AresServerConfig, error)

ReadConfig populate AresServerConfig

Types

type Option

type Option func(*Options)

Option is for setting option

type Options

type Options struct {
	DefaultCfg   map[string]interface{}
	ServerLogger common.Logger
	QueryLogger  common.Logger
	Metrics      common.Metrics
	HTTPWrappers []utils.HTTPHandlerWrapper
}

Options represents options for executing command

Jump to

Keyboard shortcuts

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