hub

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server interface {
	Start()
	Stop()
}

Server is the interface of a hub service, which provides the options to start and stop the underlying http server.

func New

func New(config api.Config, debugUsername, debugPassword, hubAddress string, authEnabled bool, authHeaderUser, authHeaderTeams, authLogoutRedirect, authSessionToken string, authSessionInterval time.Duration, satellitesClient satellites.Client, storeClient store.Client) (Server, error)

New return a new hub server. It creates the underlying http server, with the given address.

We exclude the health check from all middlewares, because the health check just returns 200. Therefore we do not need our defined middlewares like request id, metrics, auth or loggin. This also makes it easier to analyze the logs in a Kubernetes cluster where the health check is called every x seconds, because we generate less logs.

Jump to

Keyboard shortcuts

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