app

package
v0.0.0-...-1dc87c9 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewApp

func NewApp(logger logur.Logger, client client.Client, cache *ristretto.Cache, cacheTTL time.Duration) http.Handler

NewApp creates new application

Types

type Config

type Config struct {
	// Port defines server port
	Port string
	// CertFile server certificate path
	CertFile string
	// KeyFile server key path
	KeyFile string
	// CacheTTL
	CacheTTL string
}

Config holds details necessary for app.

type HTTPController

type HTTPController struct {
	Logger   logur.Logger
	Client   client.Client
	Cache    *ristretto.Cache
	CacheTTL time.Duration
}

HTTPController collects the greeting use cases and exposes them as HTTP handlers.

func NewHTTPController

func NewHTTPController(logger logur.Logger,
	client client.Client,
	cache *ristretto.Cache,
	cacheTTL time.Duration) *HTTPController

NewHTTPController returns a new HTTPController instance.

Jump to

Keyboard shortcuts

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