app

package
v2.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(flags []cli.Flag, initService func(cfg *Config) (Service, error)) *cli.App

Create loads env variables, calls the initService method for setup and starts the service.

func Interrupt

func Interrupt(sig os.Signal)

Interrupt can be used to send an interrupt signal to the running service like syscall.SIGTERM

Types

type Config

type Config struct {
	Port     int
	LogLevel string
}

Config defines the values that can be loaded from env vars or other config files.

type Service

type Service interface {
	Start() error
	Close() error
}

Service defines the methods that are required to operate a web service.

Jump to

Keyboard shortcuts

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