server

package
v1.18.2-focal Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package server provides an API gateway server which handles inbound requests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(o *Options)

func ACMEHosts

func ACMEHosts(hosts ...string) Option

func ACMEProvider

func ACMEProvider(p acme.Provider) Option

func EnableACME

func EnableACME(b bool) Option

func EnableTLS

func EnableTLS(b bool) Option

func TLSConfig

func TLSConfig(t *tls.Config) Option

type Options

type Options struct {
	EnableACME   bool
	ACMEProvider acme.Provider
	EnableTLS    bool
	ACMEHosts    []string
	TLSConfig    *tls.Config
}

type Server

type Server interface {
	Address() string
	Init(opts ...Option) error
	Handle(path string, handler http.Handler)
	Start() error
	Stop() error
}

Server serves api requests

Directories

Path Synopsis
Package acme abstracts away various ACME libraries
Package acme abstracts away various ACME libraries
autocert
Package autocert is the ACME provider from golang.org/x/crypto/acme/autocert This provider does not take any config.
Package autocert is the ACME provider from golang.org/x/crypto/acme/autocert This provider does not take any config.
certmagic
Package certmagic is the ACME provider from github.com/mholt/certmagic
Package certmagic is the ACME provider from github.com/mholt/certmagic
Package http provides a http server with features; acme, cors, etc
Package http provides a http server with features; acme, cors, etc

Jump to

Keyboard shortcuts

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