filter

package
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdmissionWebhookFilter

type AdmissionWebhookFilter struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

AdmissionWebhookFilter webhook filter

func (*AdmissionWebhookFilter) Execute

func (hook *AdmissionWebhookFilter) Execute(req *restful.Request) (int, error)

Execute webhook filter implementation

type GeneralFilter

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

GeneralFilter filter slice wrapper

func NewFilter

func NewFilter() *GeneralFilter

NewFilter create general filter

func (*GeneralFilter) AppendFilter

func (gf *GeneralFilter) AppendFilter(filterFunc RequestFilterFunction)

AppendFilter add filter

func (*GeneralFilter) Filter

func (gf *GeneralFilter) Filter(req *restful.Request, resp *restful.Response, chain *restful.FilterChain)

Filter slice implementation

type HeaderValidFilter

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

HeaderValidFilter for BCS header BCS-ClusterID

func (*HeaderValidFilter) Execute

func (h *HeaderValidFilter) Execute(req *restful.Request) (int, error)

Execute check header BCS-ClusterID

type Meta

type Meta struct {
	commtypes.TypeMeta   `json:",inline"`
	commtypes.ObjectMeta `json:"metadata"`
}

Meta for webhook

type RequestFilterFunction

type RequestFilterFunction interface {
	//Execute check http request
	Execute(req *restful.Request) (int, error)
}

RequestFilterFunction filter function definition

func NewAdmissionWebhookFilter

func NewAdmissionWebhookFilter(scheduler backend.Scheduler, kubeconfig string) (RequestFilterFunction, error)

NewAdmissionWebhookFilter create webhook filter

func NewHeaderValidFilter

func NewHeaderValidFilter(conf *config.MesosDriverConfig) RequestFilterFunction

NewHeaderValidFilter create header instance

Jump to

Keyboard shortcuts

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