caching

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DispatchTestCache

func DispatchTestCache(t testing.TB) cache.Cache

Types

type Dispatcher

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

Dispatcher is a dispatcher with cacheInst-in caching.

func NewCachingDispatcher

func NewCachingDispatcher(cacheInst cache.Cache, metricsEnabled bool, prometheusSubsystem string, keyHandler keys.Handler) (*Dispatcher, error)

NewCachingDispatcher creates a new dispatch.Dispatcher which delegates dispatch requests and caches the responses when possible and desirable.

func (*Dispatcher) Close

func (cd *Dispatcher) Close() error

func (*Dispatcher) DispatchCheck

DispatchCheck implements dispatch.Check interface

func (*Dispatcher) DispatchExpand

DispatchExpand implements dispatch.Expand interface and does not do any caching yet.

func (*Dispatcher) DispatchLookupResources

func (cd *Dispatcher) DispatchLookupResources(req *v1.DispatchLookupResourcesRequest, stream dispatch.LookupResourcesStream) error

DispatchLookupResources implements dispatch.LookupResources interface.

func (*Dispatcher) DispatchLookupSubjects

func (cd *Dispatcher) DispatchLookupSubjects(req *v1.DispatchLookupSubjectsRequest, stream dispatch.LookupSubjectsStream) error

DispatchLookupSubjects implements dispatch.LookupSubjects interface.

func (*Dispatcher) DispatchReachableResources

func (cd *Dispatcher) DispatchReachableResources(req *v1.DispatchReachableResourcesRequest, stream dispatch.ReachableResourcesStream) error

DispatchReachableResources implements dispatch.ReachableResources interface.

func (*Dispatcher) ReadyState

func (cd *Dispatcher) ReadyState() dispatch.ReadyState

func (*Dispatcher) SetDelegate

func (cd *Dispatcher) SetDelegate(delegate dispatch.Dispatcher)

SetDelegate sets the internal delegate to the specific dispatcher instance.

Jump to

Keyboard shortcuts

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