api

package
v0.0.0-...-0985497 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunInit

func RunInit()

Types

type Server

type Server struct {
	HTTP           *http.Server
	Cron           *cron.Cron
	Configuration  *configuration.ServerConfigurationSchema
	Authentication *authenticate.TokenAuth
}

Server provides an http.Server.

func NewServer

func NewServer(config *configuration.ServerConfigurationSchema) (*Server, error)

NewServer creates and configures an APIServer serving all application routes.

func (*Server) Start

func (srv *Server) Start()

Start runs ListenAndServe on the http.Server with graceful shutdown.

type Worker

type Worker struct {
	NumInstances int
}

Worker provides a background worker

func NewWorker

func NewWorker(numInstances int) (*Worker, error)

NewWorker creates and configures an background worker

func (*Worker) Start

func (srv *Worker) Start()

Start runs ListenAndServe on the http.Worker with graceful shutdown.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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