service

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequestLogger added in v0.1.2

func RequestLogger(log logging.Logger, inner http.Handler, name string) http.Handler

Types

type BindAddress

type BindAddress struct {
	Address string
}

BindAddress specifies where the http server should bind to.

type Config added in v0.1.2

type Config struct {
	Servers       ServerConfig
	InternalToken InternalTokenConfig
	IdentityKeys  webkeys.WebKeysConfig
	Keyring       keyring.Config
	Access        access.Config
	Endpoints     []string
}

Config defines all the configuration for the app

type Environment

type Environment struct {
	Logger             logging.Logger
	Config             *Config
	TimeService        stime.TimeService
	Authorizer         common.Authorizer
	InternalKeys       webkeys.WebKeysService
	InternalJWEService jwe.JWEService
	Endpoints          endpoints.Service
	PublicRouter       *mux.Router
	Shutdown           func()
}

Environment - Contains everything thats been instantiated for this service.

func NewEnvironment

func NewEnvironment(env *Environment) (*Environment, error)

NewEnvironment - Generates a new default environment. Overrides can be specified via configs.

func (*Environment) RunServers

func (env *Environment) RunServers(await bool) func()

RunServers - Boots up all the servers and awaits till they are stopped.

type GlobalConfig

type GlobalConfig struct {
	Tumbler Config
}

type HTTPConfig

type HTTPConfig struct {
	Bind BindAddress
}

HTTPConfig configuration for running an http server

type InternalTokenConfig

type InternalTokenConfig struct {
	Expiration time.Duration
	Keys       webkeys.WebKeysConfig
}

type ServerConfig

type ServerConfig struct {
	Public HTTPConfig
	Admin  HTTPConfig
}

ServerConfig - Groups all the http configs for the servers and ports that get opened.

Jump to

Keyboard shortcuts

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