Documentation ¶
Overview ¶
package accesspoint provides helpers for configuring caches in the context of setting up service-level auth access points. this logic has been moved out of lib/service in order to facilitate better testing practices.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAccessCache ¶
func NewAccessCache(cfg AccessCacheConfig) (*cache.Cache, error)
NewAccessCache builds a cache.Cache instance for a teleport service. This logic has been broken out of lib/service in order to support easier unit testing of process components.
Types ¶
type AccessCacheConfig ¶
type AccessCacheConfig struct { // Context is the base context used to propagate closure to // cache components. Context context.Context // Services is a collection of upstream services from which // the access cache will derive its state. Services services.Services // Setup is a function that takes cache configuration and // modifies it to support a specific teleport service. Setup cache.SetupConfigFn // CacheName identifies the cache in logs. CacheName []string // Events is true if cache should have the events system enabled. Events bool // Unstarted is true if the cache should not be started. Unstarted bool // MaxRetryPeriod is the max retry period between connection attempts // to auth. MaxRetryPeriod time.Duration // ProcessID is an optional identifier used to help disambiguate logs // when teleport performs in-memory reloads. ProcessID string // TracingProvider is the provider to be used for exporting // traces. No-op tracers will be used if no provider is set. TracingProvider *tracing.Provider }
AccessCacheConfig holds parameters used to confiure a cache to serve as an auth access point for a teleport service.
func (*AccessCacheConfig) CheckAndSetDefaults ¶
func (c *AccessCacheConfig) CheckAndSetDefaults() error
Click to show internal directories.
Click to hide internal directories.