http

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package http provides HTTP server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRouter added in v0.0.3

func CreateRouter(ctx context.Context, s *Server, d *docker.Client) *chi.Mux

CreateRouter creates an HTTP route multiplexer.

Types

type Server

type Server struct {
	Address          string
	Timeouts         Timeouts
	BasicAuthEnabled bool
	BasicAuthAllowed []string
	StaticFolder     string
	UITitle          string
	UIHeader         string
}

Server is a server for http.

func (*Server) Run added in v0.0.3

func (s *Server) Run(ctx context.Context, d *docker.Client) error

Run creates and starts an HTTP server.

type Timeouts added in v0.0.3

type Timeouts struct {
	Write    time.Duration
	Read     time.Duration
	Idle     time.Duration
	Shutdown time.Duration
}

Timeouts consolidate timeouts for both server and transport

Directories

Path Synopsis
Package handler provides HTTP handlers for the application.
Package handler provides HTTP handlers for the application.
Package middleware provides HTTP middleware for the application.
Package middleware provides HTTP middleware for the application.

Jump to

Keyboard shortcuts

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