frontend

package
v0.0.27 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2025 License: GPL-3.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package frontend provides a static file server for the frontend assets

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFrontendAddrRequired = errors.New("frontend address is required when frontend is enabled")
)

ErrFrontendAddrRequired is returned when frontend is enabled but no address is configured

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled bool   `yaml:"enabled" default:"false"`
	Addr    string `yaml:"addr" default:":8080" validate:"hostname_port"`
}

Config represents frontend service configuration

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the frontend configuration

type Service

type Service interface {
	Start(ctx context.Context) error
	Stop() error
	Handler() http.Handler
}

Service defines the frontend service interface

func NewService

func NewService(cfg *Config, log logrus.FieldLogger) Service

NewService creates a new frontend service

Jump to

Keyboard shortcuts

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