audit

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Copyright Jetstack Ltd. See LICENSE for details.

Copyright Jetstack Ltd. See LICENSE for details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUnauthenticatedHandler

func NewUnauthenticatedHandler(a *Audit, serveFunc func(http.ResponseWriter, *http.Request)) http.Handler

Types

type Audit

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

func New

func New(opts *options.AuditOptions, externalAddress string, secureServingInfo *server.SecureServingInfo) (*Audit, error)

New creates a new Audit struct to handle auditing for proxy requests. This is mostly a wrapper for the apiserver auditing handlers to combine them with the proxy.

func (*Audit) Run

func (a *Audit) Run(stopCh <-chan struct{}) error

Run will run the audit backend if configured.

func (*Audit) Shutdown

func (a *Audit) Shutdown() error

Shutdown will shutdown the audit backend if configured.

func (*Audit) WithRequest

func (a *Audit) WithRequest(handler http.Handler) http.Handler

WithRequest will wrap the given handler to inject the request information into the context which is then used by the wrapped audit handler.

func (*Audit) WithUnauthorized

func (a *Audit) WithUnauthorized(handler http.Handler) http.Handler

WithUnauthorized will wrap the given handler to inject the request information into the context which is then used by the wrapped audit handler.

Jump to

Keyboard shortcuts

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