Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Approver ¶
Approver check the response of specified request need to go through filter or not. and get all filters' names for the specified request.
type FilterFinder ¶ added in v1.7.0
type FilterFinder interface {
FindResponseFilter(req *http.Request) (ResponseFilter, bool)
FindObjectFilter(req *http.Request) (ObjectFilter, bool)
ResourceSyncer
}
type Initializer ¶ added in v1.3.0
type Initializer interface {
Initialize(filter ObjectFilter) error
}
type NodesInPoolGetter ¶ added in v1.5.0
type ObjectFilter ¶ added in v1.3.0
type ObjectFilter interface {
Name() string
// Filter is used for filtering runtime object
// all filter logic should be located in it.
Filter(obj runtime.Object, stopCh <-chan struct{}) runtime.Object
}
ObjectFilter is used for filtering runtime object. runtime object is only a standalone object(like Service). Every Filter need to implement ObjectFilter interface.
type ResourceSyncer ¶ added in v1.7.0
type ResourceSyncer interface {
HasSynced() bool
}
ResourceSyncer is used for verifying the resources which filter depends on has been synced or not. For example: servicetopology filter depends on service and nodebucket metadata, filter can be worked before all these metadata has been synced completely.
type ResponseFilter ¶ added in v1.3.0
type ResponseFilter interface {
Name() string
// Filter is used to filter data returned from the cloud.
Filter(req *http.Request, rc io.ReadCloser, stopCh <-chan struct{}) (int, io.ReadCloser, error)
}
ResponseFilter is used for filtering response for get/list/watch requests. it only prepares the common framework for ObjectFilter and don't cover the filter logic.