cmd

package
v0.0.0-...-4292577 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package cmd contains entrypoints for okrzeja http server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run() error

Run runs default application. It is main entrypoint for okrzeja.

Types

type WebServer

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

WebServer starts and stops HTTP configured web server.

func NewWebServer

func NewWebServer(ctx context.Context, conf *config.Static, adapter *storage.SQLite) (*WebServer, error)

NewWebServer is the only safe constructor to use for WebServer. It initializes WebServer with default dependencies and configures it with static and dynamic variables.

func (*WebServer) Start

func (ws *WebServer) Start() error

Start starts WebServer and blocks.

func (*WebServer) Stop

func (ws *WebServer) Stop(ctx context.Context) error

Stop stops WebServer and blocks until timeout deadline.

Jump to

Keyboard shortcuts

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