Documentation ¶
Index ¶
- Constants
- type Auditing
- type Backend
- type ResponseCapture
- func (c *ResponseCapture) Bytes() []byte
- func (c *ResponseCapture) CloseNotify() <-chan bool
- func (c *ResponseCapture) Header() http.Header
- func (c *ResponseCapture) Hijack() (net.Conn, *bufio.ReadWriter, error)
- func (c *ResponseCapture) StatusCode() int
- func (c *ResponseCapture) Write(data []byte) (int, error)
- func (c *ResponseCapture) WriteHeader(statusCode int)
Constants ¶
View Source
const ( GetSenderTimeout = time.Second SendTimeout = time.Second * 3 DefaultSendersNum = 100 DefaultBatchSize = 100 DefaultBatchInterval = time.Second * 3 WebhookURL = "https://kube-auditing-webhook-svc.kubesphere-logging-system.svc:6443/audit/webhook/event" )
View Source
const ( DefaultWebhook = "kube-auditing-webhook" DefaultCacheCapacity = 10000 CacheTimeout = time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auditing ¶
type Auditing interface { Enabled() bool K8sAuditingEnabled() bool LogRequestObject(req *http.Request, info *request.RequestInfo) *auditv1alpha1.Event LogResponseObject(e *auditv1alpha1.Event, resp *ResponseCapture) }
func NewAuditing ¶
func NewAuditing(informers informers.InformerFactory, opts *options.Options, stopCh <-chan struct{}) Auditing
type ResponseCapture ¶
type ResponseCapture struct { http.ResponseWriter // contains filtered or unexported fields }
func NewResponseCapture ¶
func NewResponseCapture(w http.ResponseWriter) *ResponseCapture
func (*ResponseCapture) Bytes ¶
func (c *ResponseCapture) Bytes() []byte
func (*ResponseCapture) CloseNotify ¶
func (c *ResponseCapture) CloseNotify() <-chan bool
CloseNotify is part of http.CloseNotifier interface
func (*ResponseCapture) Header ¶
func (c *ResponseCapture) Header() http.Header
func (*ResponseCapture) Hijack ¶
func (c *ResponseCapture) Hijack() (net.Conn, *bufio.ReadWriter, error)
Hijack implements the http.Hijacker interface. This expands the Response to fulfill http.Hijacker if the underlying http.ResponseWriter supports it.
func (*ResponseCapture) StatusCode ¶
func (c *ResponseCapture) StatusCode() int
func (*ResponseCapture) WriteHeader ¶
func (c *ResponseCapture) WriteHeader(statusCode int)
Click to show internal directories.
Click to hide internal directories.