shared

package
v1.8.14 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2025 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
	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 WithLogger added in v1.8.5

func WithLogger(logger logger.Logger) SharedDatastoreResourcesOpt

WithLogger sets the logger for CachedDatastore.

Jump to

Keyboard shortcuts

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