rest

package
v0.16.7 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 44 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	LeaseShellCodeStdout         = 100
	LeaseShellCodeStderr         = 101
	LeaseShellCodeResult         = 102
	LeaseShellCodeFailure        = 103
	LeaseShellCodeStdin          = 104
	LeaseShellCodeTerminalResize = 105
)

Variables

This section is empty.

Functions

func AuthHeaderTokenExtractor added in v0.7.0

func AuthHeaderTokenExtractor(r *http.Request) (string, error)

AuthHeaderTokenExtractor is a TokenExtractor that takes a request and extracts the token from the Authorization header.

func DefaultErrorHandler added in v0.7.0

func DefaultErrorHandler(w http.ResponseWriter, r *http.Request, err error)

DefaultErrorHandler writes err as a JSON error response. Errors that are not *httperror.HttpError are logged with the logger found in the request context.

func NewServer

func NewServer(
	ctx context.Context,
	log log.Logger,
	pclient provider.Client,
	cquery gwutils.CertGetter,
	sni string,
	address string,
	pid sdk.Address,
	clusterConfig map[interface{}]interface{},
) (*http.Server, error)

Types

type CtxAuthKey

type CtxAuthKey string

Jump to

Keyboard shortcuts

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