restapihandler

package
v0.2.240 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAPIAuth added in v0.2.208

func NewAPIAuth(ctx context.Context, client kubernetes.Interface) (func(http.Handler) http.Handler, error)

NewAPIAuth builds the authentication middleware for the operator's HTTP API. KS_API_AUDIENCE overrides the token audience; POD_NAMESPACE is the SAR namespace.

Types

type HTTPHandler

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

func NewHTTPHandler

func NewHTTPHandler(pool *ants.PoolWithFunc, config config.IConfig) *HTTPHandler

func (*HTTPHandler) ActionRequest

func (resthandler *HTTPHandler) ActionRequest(w http.ResponseWriter, r *http.Request)

func (*HTTPHandler) HandleActionRequest

func (resthandler *HTTPHandler) HandleActionRequest(ctx context.Context, receivedCommands []byte) error

HandleActionRequest Parse received commands and run the command

func (*HTTPHandler) SetupHTTPListener

func (resthandler *HTTPHandler) SetupHTTPListener(bindAddress, port string, auth func(http.Handler) http.Handler) error

SetupHTTPListener set up listening http servers

Jump to

Keyboard shortcuts

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