singleflight

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataReader

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

DataReader - Add singleflight behaviour to data reader

func NewDataReader

func NewDataReader(delegate storage.DataReader) *DataReader

NewDataReader - Add singleflight behaviour to new data reader

func (*DataReader) HeadSnapshot

func (r *DataReader) HeadSnapshot(ctx context.Context, tenantID string) (token.SnapToken, error)

HeadSnapshot - Reads the latest version of the snapshot from the repository.

func (*DataReader) QueryAttributes

func (r *DataReader) QueryAttributes(ctx context.Context, tenantID string, filter *base.AttributeFilter, token string) (*database.AttributeIterator, error)

QueryAttributes - Reads multiple attributes from the repository.

func (*DataReader) QueryRelationships

func (r *DataReader) QueryRelationships(ctx context.Context, tenantID string, filter *base.TupleFilter, token string) (*database.TupleIterator, error)

QueryRelationships - Reads relation tuples from the repository

func (*DataReader) QuerySingleAttribute

func (r *DataReader) QuerySingleAttribute(ctx context.Context, tenantID string, filter *base.AttributeFilter, token string) (*base.Attribute, error)

QuerySingleAttribute - Reads a single attribute from the repository.

func (*DataReader) QueryUniqueEntities

func (r *DataReader) QueryUniqueEntities(ctx context.Context, tenantID, name, token string, pagination database.Pagination) (ids []string, ct database.EncodedContinuousToken, err error)

QueryUniqueEntities - Reads unique entities from the repository with different options.

func (*DataReader) QueryUniqueSubjectReferences

func (r *DataReader) QueryUniqueSubjectReferences(ctx context.Context, tenantID string, subjectReference *base.RelationReference, token string, pagination database.Pagination) (ids []string, ct database.EncodedContinuousToken, err error)

QueryUniqueSubjectReferences - Reads unique subject references from the repository with different options.

func (*DataReader) ReadAttributes

func (r *DataReader) ReadAttributes(ctx context.Context, tenantID string, filter *base.AttributeFilter, token string, pagination database.Pagination) (collection *database.AttributeCollection, ct database.EncodedContinuousToken, err error)

ReadAttributes - Reads multiple attributes from the repository with different options.

func (*DataReader) ReadRelationships

func (r *DataReader) ReadRelationships(ctx context.Context, tenantID string, filter *base.TupleFilter, token string, pagination database.Pagination) (collection *database.TupleCollection, ct database.EncodedContinuousToken, err error)

ReadRelationships - Reads relation tuples from the repository with different options.

type SchemaReader

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

SchemaReader - Add singleflight behaviour to schema reader

func NewSchemaReader

func NewSchemaReader(delegate storage.SchemaReader) *SchemaReader

NewSchemaReader - Add singleflight behaviour to new schema reader

func (*SchemaReader) HeadVersion

func (r *SchemaReader) HeadVersion(ctx context.Context, tenantID string) (version string, err error)

HeadVersion - Finds the latest version of the schema.

func (*SchemaReader) ListSchemas added in v0.7.5

func (r *SchemaReader) ListSchemas(ctx context.Context, tenantID string, pagination database.Pagination) (schemas []*base.SchemaList, ct database.EncodedContinuousToken, err error)

ListSchemas - List all Schemas

func (*SchemaReader) ReadEntityDefinition

func (r *SchemaReader) ReadEntityDefinition(ctx context.Context, tenantID, entityName, version string) (*base.EntityDefinition, string, error)

ReadEntityDefinition - Read entity definition from repository

func (*SchemaReader) ReadRuleDefinition

func (r *SchemaReader) ReadRuleDefinition(ctx context.Context, tenantID, ruleName, version string) (*base.RuleDefinition, string, error)

ReadRuleDefinition - Read rule definition from repository

func (*SchemaReader) ReadSchema

func (r *SchemaReader) ReadSchema(ctx context.Context, tenantID, version string) (*base.SchemaDefinition, error)

ReadSchema returns the schema definition for a specific tenant and version as a structured object.

func (*SchemaReader) ReadSchemaString added in v0.7.9

func (r *SchemaReader) ReadSchemaString(ctx context.Context, tenantID, version string) (definitions []string, err error)

ReadSchemaString returns the schema definition for a specific tenant and version as a string.

Jump to

Keyboard shortcuts

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