cache

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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, labels, fields labels.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.

Jump to

Keyboard shortcuts

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