app

package
v0.0.0-...-79b5d29 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitChans

func InitChans() map[string]chan ChannelMessage

func InitDatabase

func InitDatabase(c *conf.Config) (model.Storage, error)

InitDatabase bootstraps database and returns app storage.

func InitLogger

func InitLogger(c *conf.Config) (*zerolog.Logger, error)

InitLogger returns a logger with the configured level

Types

type App

type App struct {
	Server   *http.Server
	Storage  model.Storage
	Router   *chi.Mux
	Logger   *zerolog.Logger
	Channels map[string]chan ChannelMessage
}

App ...

func (*App) Bootstrap

func (a *App) Bootstrap(c *conf.Config)

Bootstrap prepares app for run by setting things up based on provided config.

func (*App) InitTimer

func (a *App) InitTimer(c *conf.Config)

InitTimer kicks off the timer process intended to run in the background.

func (*App) RunApp

func (a *App) RunApp(c *conf.Config)

RunApp starts app functionality and ensures a graceful shutdown.

func (*App) RunTest

func (a *App) RunTest(name string, duration time.Duration, tps int, target string) (*vegeta.Metrics, error)

RunTest executes a given test using the vegeta library and returns the related metrics once complete.

type ChannelMessage

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

Jump to

Keyboard shortcuts

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