okrzejahauru.club/x/okrzeja/cmd Index | Files

package cmd

import "hauru.club/x/okrzeja/cmd"

Package cmd contains entrypoints for okrzeja http server.

Index

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.

Source Files

app.go cmd.go

Version
v0.0.0-20231010043146-4292577f982b (latest)
Published
Oct 10, 2023
Platform
linux/amd64
Imports
15 packages
Last checked
1 day ago

Tools for package owners.