cache

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2015 License: Apache-2.0 Imports: 13 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.WatchingRegistry, policyRegistry policyregistry.WatchingRegistry, clusterBindingRegistry clusterbindingregistry.WatchingRegistry, clusterPolicyRegistry clusterpolicyregistry.WatchingRegistry) *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.

Jump to

Keyboard shortcuts

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