http

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

package bhttp is the http server for smee.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	GitRev         string
	StartTime      time.Time
	Logger         logr.Logger
	TrustedProxies []string
}

Config is the configuration for the http server.

func (*Config) ServeHTTP

func (s *Config) ServeHTTP(ctx context.Context, addr string, handlers HandlerMapping) error

ServeHTTP sets up all the HTTP routes using a stdlib mux and starts the http server, which will block. App functionality is instrumented in Prometheus and OpenTelemetry.

type HandlerMapping

type HandlerMapping map[string]http.HandlerFunc

HandlerMapping is a map of routes to http.HandlerFuncs.

Jump to

Keyboard shortcuts

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