frontend

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2025 License: GPL-3.0 Imports: 28 Imported by: 0

Documentation

Overview

Package frontend implements the frontend server of the load balancer

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownClusterID = errors.New("unknown cluster ID")
)

Custom errors.

Functions

This section is empty.

Types

type Config

type Config struct {
	Logger           *slog.Logger
	LBType           base.LBType
	Address          string
	WebSystemdSocket bool
	WebConfigFile    string
	APIServer        ceems_api_cli.CEEMSAPIServerConfig
	Manager          serverpool.Manager
}

Config makes a server config from CLI args.

type LoadBalancer

type LoadBalancer interface {
	Serve(w http.ResponseWriter, r *http.Request)
	Start(ctx context.Context) error
	Shutdown(ctx context.Context) error
}

LoadBalancer is the interface to implement.

func New

func New(c *Config) (LoadBalancer, error)

New returns a new instance of load balancer.

type ReqParams

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

ReqParams is the context value.

type ReqParamsContextKey

type ReqParamsContextKey struct{}

ReqParamsContextKey is the key used to set context value for request parameters.

type RetryContextKey

type RetryContextKey struct{}

RetryContextKey is the key used to set context value for retry.

Jump to

Keyboard shortcuts

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