server

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTLSCertKeyBothOrNeither = errors.New("TLS cert and key must both be provided or neither")
View Source
var ErrTLSOrSelfSigned = errors.New("cannot provide TLS certificate and also run self-signed")

Functions

func NewHandler

func NewHandler(origHandler http.Handler, authToken string, isHTTPS bool) http.Handler

Types

type Config

type Config struct {
	TLSCert     string
	TLSKey      string
	SelfSigned  bool
	Debug       bool
	Kubeconfig  string
	BindHost    string
	BindPort    string
	DevMode     bool
	NoToken     bool
	AppVersion  string
	ChopRelease string
	UIFiles     *embed.FS
	EmbedFiles  *embed.FS
	URL         string
	IsHTTPS     bool
	ServerError error
	Context     context.Context
	Cancel      func()
}

func (*Config) RunServer

func (c *Config) RunServer() error

type Handler

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

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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