serverutil

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2021 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultGates = map[string]func(*sqlx.DB) web.Gate{
		"build":     buildrouter.Gate,
		"cron":      cronrouter.Gate,
		"image":     imagerouter.Gate,
		"key":       keyrouter.Gate,
		"namespace": namespacerouter.Gate,
		"oauth2":    oauth2router.Gate,
		"object":    objectrouter.Gate,
		"provider":  providerrouter.Gate,
		"variable":  variablerouter.Gate,
	}
)

Functions

func Init

func Init(ctx context.Context, path string) (*server.Server, *config.Server, func(), error)

func ParseFlags

func ParseFlags(args []string) (bool, string, bool, bool)

func RegisterRoutes

func RegisterRoutes(cfg *config.Server, api, ui bool, srv *server.Server)

func RegisterRoutesWithGates

func RegisterRoutesWithGates(cfg *config.Server, api, ui bool, srv *server.Server, gates map[string][]web.Gate)

func Start

func Start(srv *server.Server, ch chan os.Signal)

Start will start the server in a goroutine. If the server fails to start then SIGKILL is sent to the given channel to signal that the program should terminate. A channel is used so we can gracefully close down any connections that the server may have opened.

Types

This section is empty.

Jump to

Keyboard shortcuts

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