shared

package
v1.11.4 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SharedDatastoreResources added in v1.8.10

type SharedDatastoreResources struct {
	SingleflightGroup     *singleflight.Group
	WaitGroup             *sync.WaitGroup
	ServerCtx             context.Context
	CheckCache            storage.InMemoryCache[any]
	CacheController       cachecontroller.CacheController
	ShadowCheckCache      storage.InMemoryCache[any]
	ShadowCacheController cachecontroller.CacheController
	Logger                logger.Logger
	SharedIteratorStorage *sharediterator.Storage
}

SharedDatastoreResources contains resources that can be shared across Check requests.

func NewSharedDatastoreResources added in v1.8.10

func NewSharedDatastoreResources(
	sharedCtx context.Context,
	sharedSf *singleflight.Group,
	ds storage.OpenFGADatastore,
	settings serverconfig.CacheSettings,
	opts ...SharedDatastoreResourcesOpt,
) (*SharedDatastoreResources, error)

func (*SharedDatastoreResources) Close added in v1.8.10

func (s *SharedDatastoreResources) Close()

type SharedDatastoreResourcesOpt added in v1.8.10

type SharedDatastoreResourcesOpt func(*SharedDatastoreResources)

SharedDatastoreResourcesOpt defines an option that can be used to change the behavior of SharedDatastoreResources instance.

func WithCacheController added in v1.8.10

func WithCacheController(cacheController cachecontroller.CacheController) SharedDatastoreResourcesOpt

WithCacheController allows overriding the default cacheController created in NewSharedDatastoreResources().

func WithCheckCache added in v1.11.4

func WithLogger added in v1.8.5

func WithLogger(logger logger.Logger) SharedDatastoreResourcesOpt

WithLogger sets the logger for SharedDatastoreResources.

func WithShadowCacheController added in v1.9.2

func WithShadowCacheController(cacheController cachecontroller.CacheController) SharedDatastoreResourcesOpt

WithShadowCacheController allows overriding the default shadow cacheController created in NewSharedDatastoreResources().

Jump to

Keyboard shortcuts

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