server

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LoggerLevel log level
	LoggerLevel config.ValueT[string] = "logger/level"

	// ServerEndpoint server endpoint
	ServerEndpoint config.ValueT[string] = "server/endpoint"

	// ServerGracefulShutdown graceful shutdown period
	ServerGracefulShutdown config.ValueT[time.Duration] = "server/graceful-shutdown"

	// ServerAPIpathPrefix is a path api prefix
	ServerAPIpathPrefix config.ValueT[string] = "server/api-path-prefix"

	// MetricsEnable enable api metrics
	MetricsEnable config.ValueT[bool] = "metrics/enable"

	// HealthcheckEnable enables|disables health check handler
	HealthcheckEnable config.ValueT[bool] = "healthcheck/enable"

	// StorageType selects storage DB backend
	StorageType config.ValueT[string] = "storage/type"

	// PostgresURL URL to connect Postgres DB
	PostgresURL config.ValueT[string] = "storage/postgres/url"

	//                    -= AuthnType =-
	// AuthnType selects authn type <none|tls> where `none` is by default
	AuthnType config.AuthnTypeSelector = "authn/type"
	//                    -= AUTHN/TLS =-
	// TLSprivKeyFile server private key PEM encoded file
	TLSprivKeyFile config.TLSprivKeyFile = "authn/tls/key-file"
	// TLScertFile server cert PEM encoded file
	TLScertFile config.TLScertFile = "authn/tls/cert-file"
	// TLSclientCAfiles client cert authority PEM files
	TLSclientCAfiles config.TLScaFiles = "authn/tls/client/ca-files"
	// TLSclientVerifyStrategy verify client and certs a.k.a MTLS; 'skip' is by default
	TLSclientVerifyStrategy config.TLSclientVerifyStrategy = "authn/tls/client/verify"
)
View Source
const (
	// HandleMetrics -
	HandleMetrics = "metrics"

	// HandleHealthcheck -
	HandleHealthcheck = "healthcheck"

	// HandleDebug -
	HandleDebug = "debug"
)

Variables

View Source
var ConfigFile string

ConfigFile file with actual app config

Functions

func SetupContext

func SetupContext()

SetupContext -

func SetupLogger

func SetupLogger() error

func SetupRegistry

func SetupRegistry() error

func SetupSgServer

func SetupSgServer(ctx context.Context) (*server.APIServer, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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