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" 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 []zap.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.