app

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

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"
)
View Source
const (
	DeploymentsDir  = ".deploy"
	ValuesDir       = "config"
	ValuesExt       = "yaml"
	ValuesBaseName  = "values"
	ValuesDevName   = "values_dev"
	ValuesLocalName = "values_local"
	ValuesStgName   = "values_stage"
	ValuesProdName  = "values_prod"
)

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
}

type Namespace

type Namespace string
const (
	NamespaceDev   Namespace = "dev"
	NamespaceLocal Namespace = "local"
	NamespaceStage Namespace = "stage"
	NamespaceProd  Namespace = "prod"
)

func ParseNamespace

func ParseNamespace(s string) Namespace

func (Namespace) String

func (n Namespace) String() string

func (Namespace) ValuesPath

func (n Namespace) ValuesPath() string

type Option

type Option func(opts *Options) error

type Options

type Options struct {
	// New options.
	Hostname      string
	PortAdmin     uint16
	PortHTTP      uint16
	PortGRPC      uint16
	LoggerOptions []zap.Option
	ExitSignals   []os.Signal
	CorsOptions   cors.Options

	// Run options.
	TLSConfig   *tls.Config
	GRPCOptions []grpc.ServerOption
	// contains filtered or unexported fields
}

func NewOptions

func NewOptions(options ...Option) (*Options, error)

func (*Options) AddRunOptions added in v0.2.0

func (o *Options) AddRunOptions(options ...RunOption)

func (*Options) ApplyRunOptions

func (o *Options) ApplyRunOptions() error

type RunOption

type RunOption func(opts *Options) error

Jump to

Keyboard shortcuts

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