config

package
v0.0.0-...-42befb5 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// StartJSONApiServerFlag determines if json api server should be started.
	StartJSONApiServerFlag = altsrc.NewBoolFlag(cli.BoolFlag{
		Name:        "json-server",
		Usage:       "StartService the json http server. Note that starting the Json server also starts the grpc server.",
		Destination: &ConfigValues.StartJSONServer,
	})

	// JSONServerPortFlag determines the json api server local listening port.
	JSONServerPortFlag = altsrc.NewIntFlag(cli.IntFlag{
		Name:        "json-port",
		Usage:       "Json api server port",
		Value:       ConfigValues.JSONServerPort,
		Destination: &ConfigValues.JSONServerPort,
	})

	// StartGrpcAPIServerFlag determines if the grpc server should be started.
	StartGrpcAPIServerFlag = altsrc.NewBoolFlag(cli.BoolFlag{
		Name:        "grpc-server",
		Usage:       "StartService the grpc server",
		Destination: &ConfigValues.StartGrpcServer,
	})

	// GrpcServerPortFlag determines the grpc server local listening port.
	GrpcServerPortFlag = altsrc.NewIntFlag(cli.IntFlag{
		Name:        "grpc-port",
		Usage:       "Grpc api server port",
		Value:       ConfigValues.GrpcServerPort,
		Destination: &ConfigValues.GrpcServerPort,
	})
)

Service flags for api servers.

View Source
var ConfigValues = Config{
	StartGrpcServer: false,
	GrpcServerPort:  9091,
	StartJSONServer: false,
	JSONServerPort:  9090,
}

ConfigValues provide default config values.

Functions

This section is empty.

Types

type Config

type Config struct {
	StartGrpcServer bool
	GrpcServerPort  int
	StartJSONServer bool
	JSONServerPort  int
}

Config defines the api config params.

Jump to

Keyboard shortcuts

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