app

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package app contains all the necessary things to build simple web application using MemLimiter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

App - CLI application.

func NewApp

func NewApp(logger logr.Logger, factory Factory) *App

NewApp prepares new application.

func (*App) Run

func (a *App) Run()

Run launches the application.

type Factory

type Factory interface {
	// MakeServer creates a server.
	MakeServer(c *cli.Context) (Runnable, error)
	// MakePerfClient creates a client for performance tests.
	MakePerfClient(c *cli.Context) (Runnable, error)
}

Factory builds runnable tasks.

func NewFactory

func NewFactory(logger logr.Logger) Factory

NewFactory makes new default factory.

type Runnable

type Runnable interface {
	// Run - a blocking call.
	Run() error
	// Quit terminates process.
	Quit()
}

Runnable represents some task that can be run.

Jump to

Keyboard shortcuts

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