sharediterator

package
v1.8.13 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatastoreStorageOpt

type DatastoreStorageOpt func(*Storage)

func WithSharedIteratorDatastoreStorageLimit

func WithSharedIteratorDatastoreStorageLimit(limit int) DatastoreStorageOpt

WithSharedIteratorDatastoreStorageLimit sets the limit on the number of items in SF iterator iters.

type IteratorDatastore

type IteratorDatastore struct {
	storage.RelationshipTupleReader
	// contains filtered or unexported fields
}

func NewSharedIteratorDatastore

func NewSharedIteratorDatastore(inner storage.RelationshipTupleReader, internalStorage *Storage, opts ...IteratorDatastoreOpt) *IteratorDatastore

func (*IteratorDatastore) Read

func (*IteratorDatastore) ReadStartingWithUser

func (*IteratorDatastore) ReadUsersetTuples

type IteratorDatastoreOpt

type IteratorDatastoreOpt func(*IteratorDatastore)

func WithIteratorTargetSize added in v1.8.13

func WithIteratorTargetSize(targetSize uint32) IteratorDatastoreOpt

WithIteratorTargetSize sets the pre-allocated size of each shared tuple. This allows iterator from having to reallocate buffer space unless we go over that value.

func WithMaxAdmissionTime added in v1.8.13

func WithMaxAdmissionTime(maxAdmissionTime time.Duration) IteratorDatastoreOpt

WithMaxAdmissionTime sets the maximum duration for which shared iterator allows clone. After this period, clone will fail and fall back to non-shared iterator. This is done to prevent stale data if there are very long-running requests.

func WithMaxTTL added in v1.8.13

func WithMaxTTL(ttl time.Duration) IteratorDatastoreOpt

WithMaxTTL sets the time for watchdog will kick and clean up.

func WithMethod added in v1.8.13

func WithMethod(method string) IteratorDatastoreOpt

WithMethod specifies whether the shared iterator is for check or list objects for metrics.

func WithSharedIteratorDatastoreLogger

func WithSharedIteratorDatastoreLogger(logger logger.Logger) IteratorDatastoreOpt

WithSharedIteratorDatastoreLogger sets the logger for the IteratorDatastore.

type Storage

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

func NewSharedIteratorDatastoreStorage

func NewSharedIteratorDatastoreStorage(opts ...DatastoreStorageOpt) *Storage

Jump to

Keyboard shortcuts

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