Documentation ¶
Index ¶
- type PolicyCache
- func (c *PolicyCache) GetPolicy(ctx kapi.Context, name string) (*authorizationapi.Policy, error)
- func (c *PolicyCache) ListPolicyBindings(ctx kapi.Context, label labels.Selector, field fields.Selector) (*authorizationapi.PolicyBindingList, error)
- func (c *PolicyCache) Run()
- func (c *PolicyCache) RunUntil(bindingStopCh <-chan struct{}, policyStopCh <-chan struct{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PolicyCache ¶
type PolicyCache struct {
// contains filtered or unexported fields
}
PolicyCache maintains a cache of PolicyRules
func NewPolicyCache ¶
func NewPolicyCache(bindingRegistry bindingregistry.Registry, policyRegistry policyregistry.Registry) *PolicyCache
NewPolicyCache creates a new PolicyCache. You cannot use a normal client, because you don't want policy guarding the policy from the authorizer
func (*PolicyCache) GetPolicy ¶
func (c *PolicyCache) GetPolicy(ctx kapi.Context, name string) (*authorizationapi.Policy, error)
GetPolicy retrieves a specific policy. It conforms to rulevalidation.PolicyGetter.
func (*PolicyCache) ListPolicyBindings ¶
func (c *PolicyCache) ListPolicyBindings(ctx kapi.Context, label labels.Selector, field fields.Selector) (*authorizationapi.PolicyBindingList, error)
ListPolicyBindings obtains list of policyBindings that match a selector. It conforms to rulevalidation.BindingLister
func (*PolicyCache) Run ¶
func (c *PolicyCache) Run()
Run begins watching and synchronizing the cache
func (*PolicyCache) RunUntil ¶
func (c *PolicyCache) RunUntil(bindingStopCh <-chan struct{}, policyStopCh <-chan struct{})
RunUntil starts a watch and handles watch events. Will restart the watch if it is closed. RunUntil starts a goroutine and returns immediately. It will exit when stopCh is closed.
Click to show internal directories.
Click to hide internal directories.