Documentation
¶
Index ¶
- func NewAPIAuth(ctx context.Context, client kubernetes.Interface) (func(http.Handler) http.Handler, error)
- type HTTPHandler
- func (resthandler *HTTPHandler) ActionRequest(w http.ResponseWriter, r *http.Request)
- func (resthandler *HTTPHandler) HandleActionRequest(ctx context.Context, receivedCommands []byte) error
- func (resthandler *HTTPHandler) SetupHTTPListener(bindAddress, port string, auth func(http.Handler) http.Handler) error
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
Click to show internal directories.
Click to hide internal directories.