backend

package module
v0.0.0-...-9831a62 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DB            *db.Config            `yaml:"db"`
	HTTP          *httpx.Config         `yaml:"http"`
	Subscriptions *subscriptions.Config `yaml:"subscriptions"`
	Users         *users.Config         `yaml:"users"`
	Web           *web.Config           `yaml:"web"`
}

Config contains all server configuration.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is the main object.

func New

func New(log *logger.Logger, cfg *Config) (*Server, error)

New returns a new initialized server object.

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

Shutdown gracefully stops all components of the server.

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Start starts all components of the server.

Jump to

Keyboard shortcuts

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