httpserver

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicAuth

func BasicAuth(authUsername, authPassword string, handler http.Handler) http.Handler

BasicAuth adds authentication to the routes handled by handler skips authentication if both authUsername and authPassword aren't set

func RegisterHardwareServiceHandlerFromEndpoint

func RegisterHardwareServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) error

RegisterHardwareServiceHandlerFromEndpoint serves Hardware requests at the given endpoint over GRPC

func RegisterTemplateHandlerFromEndpoint

func RegisterTemplateHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) error

RegisterTemplateHandlerFromEndpoint serves Template requests at the given endpoint over GRPC

func RegisterWorkflowSvcHandlerFromEndpoint

func RegisterWorkflowSvcHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) error

RegisterWorkflowSvcHandlerFromEndpoint serves Workflow requests at the given endpoint over GRPC

func SetupHTTP

func SetupHTTP(ctx context.Context, lg log.Logger, config *HTTPServerConfig, errCh chan<- error)

SetupHTTP setup and return an HTTP server

Types

type HTTPServerConfig added in v0.5.0

type HTTPServerConfig struct {
	CertPEM               []byte
	ModTime               time.Time
	GRPCAuthority         string
	HTTPAuthority         string
	HTTPBasicAuthUsername string
	HTTPBasicAuthPassword string
}

Jump to

Keyboard shortcuts

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