Documentation ¶
Overview ¶
Package app contains base application constants, flags and options.
Index ¶
Constants ¶
View Source
const ( NamespaceEnv = "NAMESPACE" LoggerLevelEnv = "LOGGER_LEVEL" LoggerCollectorAddrEnv = "LOGGER_COLLECTOR_ADDR" LoggerDisableStdoutEnv = "LOGGER_DISABLE_STDOUT" JaegerAddrEnv = "JAEGER_ADDR" JaegerSamplerType = "JAEGER_SAMPLER_TYPE" JaegerSamplerParam = "JAEGER_SAMPLER_PARAM" HTTPPortEnv = "SERVICE_PORT_HTTP" GRPCPortEnv = "SERVICE_PORT_GRPC" AdminPortEnv = "SERVICE_PORT_ADMIN" )
Application internal config keys.
View Source
const ( DeploymentsDir = ".deploy" ValuesDir = "config" ValuesExt = "yaml" ValuesBaseName = "values" ValuesDevName = "values_dev" ValuesLocalName = "values_local" ValuesStgName = "values_stage" ValuesProdName = "values_prod" )
Default names for application files and directories.
Variables ¶
View Source
var ( InstanceUUID = uuid.New() StartTime = time.Now() ServiceName = "-" AppName = "-" GitHash = "-" Version = "-" BuildAt = "0001-01-01T00:00:00" )
nolint:gochecknoglobals // build args
Functions ¶
This section is empty.
Types ¶
type Info ¶ added in v0.2.0
type Info struct { InstanceUUID string ServiceName string Namespace string AppName string GitHash string Version string BuildAt string StartTime time.Time }
Info contains service information.
type Namespace ¶
type Namespace string
Namespace type.
const ( NamespaceDev Namespace = "dev" NamespaceLocal Namespace = "local" NamespaceStage Namespace = "stage" NamespaceProd Namespace = "prod" )
Namespace values.
func (Namespace) ValuesName ¶ added in v0.8.0
ValuesName returns config values name for current namespace.
type Options ¶
type Options struct { // New options. Hostname string PortAdmin uint16 PortHTTP uint16 PortGRPC uint16 RealtimeConfig bool LoggerOptions []zaplog.Option ExitSignals []os.Signal ConfigMap map[string]interface{} GRPCListener net.Listener HTTPListener net.Listener // Run options. TLSConfig *tls.Config GRPCOptions []grpc.ServerOption // contains filtered or unexported fields }
Options is base tron options.
func NewOptions ¶
NewOptions returns Options with applied Option list.
func (*Options) AddRunOptions ¶ added in v0.2.0
AddRunOptions append run options to others options.
func (*Options) ApplyRunOptions ¶
ApplyRunOptions sets run options.
Click to show internal directories.
Click to hide internal directories.