MCPcopy
hub / github.com/openfga/openfga / NewStaticTupleIterator

Function NewStaticTupleIterator

pkg/storage/tuple_iterators.go:133–140  ·  view source on GitHub ↗

NewStaticTupleIterator returns a [TupleIterator] that iterates over the provided slice.

(tuples []*openfgav1.Tuple)

Source from the content-addressed store, hash-verified

131
132// NewStaticTupleIterator returns a [TupleIterator] that iterates over the provided slice.
133func NewStaticTupleIterator(tuples []*openfgav1.Tuple) TupleIterator {
134 iter := &StaticIterator[*openfgav1.Tuple]{
135 items: tuples,
136 mu: &sync.Mutex{},
137 }
138
139 return iter
140}
141
142// NewStaticTupleKeyIterator returns a [TupleKeyIterator] that iterates over the provided slice.
143func NewStaticTupleKeyIterator(tupleKeys []*openfgav1.TupleKey) TupleKeyIterator {

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…