Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithPolicyCache ¶
func WithPolicyCache(ctx context.Context, cache *PolicyCache) context.Context
WithPolicyCache returns a new context with the provided PolicyCache added.
Types ¶
type KeyValuePair ¶
KeyValuePair represents a key-value pair from the cache.
type PolicyCache ¶
PolicyCache holds cached policy data using a thread-safe map.
func CreatePolicyCache ¶
func CreatePolicyCache() (*PolicyCache, error)
func NewPolicyCache ¶
func NewPolicyCache(ctx context.Context) (*PolicyCache, error)
NewPolicyCache creates and returns a new PolicyCache instance.
func PolicyCacheFromContext ¶
func PolicyCacheFromContext(ctx context.Context) (*PolicyCache, bool)
PolicyCacheFromContext retrieves the PolicyCache from the context. It returns the PolicyCache and true if found, or nil and false otherwise.
Click to show internal directories.
Click to hide internal directories.