common

package
v0.3.62 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const PodNamePrefix string = "armada-"

Variables

This section is empty.

Functions

func BindCommandlineArguments

func BindCommandlineArguments()

func ConfigureCommandLineLogging

func ConfigureCommandLineLogging()

TODO Move logging-related code out of common into a new package internal/logging

func ConfigureLogging

func ConfigureLogging()

func ContextWithDefaultTimeout

func ContextWithDefaultTimeout() (context.Context, context.CancelFunc)

func LoadConfig

func LoadConfig(config interface{}, defaultPath string, overrideConfigs []string) *viper.Viper

TODO Move code relating to config out of common into a new package internal/serverconfig

func ServeHttp

func ServeHttp(port uint16, mux http.Handler) (shutdown func())

ServeHttp starts an HTTP server listening on the given port.

func ServeMetrics

func ServeMetrics(port uint16) (shutdown func())

func ServeMetricsFor

func ServeMetricsFor(port uint16, gatherer prometheus.Gatherer) (shutdown func())

func UnmarshalKey

func UnmarshalKey(v *viper.Viper, key string, item interface{}) error

Types

type LoginCredentials

type LoginCredentials struct {
	Username string
	Password string
}

func (*LoginCredentials) GetRequestMetadata

func (c *LoginCredentials) GetRequestMetadata(context.Context, ...string) (map[string]string, error)

func (*LoginCredentials) RequireTransportSecurity

func (c *LoginCredentials) RequireTransportSecurity() bool

Directories

Path Synopsis
Package armadaerrors contains generic errors that should be returned by code handling gRPC requests.
Package armadaerrors contains generic errors that should be returned by code handling gRPC requests.
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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