decorators

package
v0.5.9 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataReaderWithCircuitBreaker added in v0.5.0

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

DataReaderWithCircuitBreaker - Add circuit breaker behaviour to data reader

func NewDataReaderWithCircuitBreaker added in v0.5.0

func NewDataReaderWithCircuitBreaker(delegate storage.DataReader) *DataReaderWithCircuitBreaker

NewDataReaderWithCircuitBreaker - Add circuit breaker behaviour to new data reader

func (*DataReaderWithCircuitBreaker) HeadSnapshot added in v0.5.0

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

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

func (*DataReaderWithCircuitBreaker) QueryAttributes added in v0.5.0

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

QueryAttributes - Reads multiple attributes from the repository.

func (*DataReaderWithCircuitBreaker) QueryRelationships added in v0.5.0

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

QueryRelationships - Reads relation tuples from the repository

func (*DataReaderWithCircuitBreaker) QuerySingleAttribute added in v0.5.0

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

QuerySingleAttribute - Reads a single attribute from the repository.

func (*DataReaderWithCircuitBreaker) QueryUniqueEntities added in v0.5.0

func (r *DataReaderWithCircuitBreaker) 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 (*DataReaderWithCircuitBreaker) QueryUniqueSubjectReferences added in v0.5.0

func (r *DataReaderWithCircuitBreaker) 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 (*DataReaderWithCircuitBreaker) ReadAttributes added in v0.5.0

func (r *DataReaderWithCircuitBreaker) 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 (*DataReaderWithCircuitBreaker) ReadRelationships added in v0.5.0

func (r *DataReaderWithCircuitBreaker) 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 DataWriterWithCircuitBreaker added in v0.5.0

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

DataWriterWithCircuitBreaker - Add circuit breaker behaviour to data writer

func NewDataWriterWithCircuitBreaker added in v0.5.0

func NewDataWriterWithCircuitBreaker(delegate storage.DataWriter) *DataWriterWithCircuitBreaker

NewDataWriterWithCircuitBreaker - Add circuit breaker behaviour to new data writer

func (*DataWriterWithCircuitBreaker) Delete added in v0.5.0

func (r *DataWriterWithCircuitBreaker) Delete(ctx context.Context, tenantID string, tupleFilter *base.TupleFilter, attrFilter *base.AttributeFilter) (token.EncodedSnapToken, error)

Delete - Delete relation tuples and attributes from the repository

func (*DataWriterWithCircuitBreaker) Write added in v0.5.0

func (r *DataWriterWithCircuitBreaker) Write(ctx context.Context, tenantID string, tupleCollection *database.TupleCollection, attributeCollection *database.AttributeCollection) (token.EncodedSnapToken, error)

WriteRelationships - Write relation tuples from the repository

type SchemaReaderWithCache

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

SchemaReaderWithCache - Add cache behaviour to schema reader

func NewSchemaReaderWithCache

func NewSchemaReaderWithCache(delegate storage.SchemaReader, cache cache.Cache) *SchemaReaderWithCache

NewSchemaReaderWithCache new instance of SchemaReaderWithCache

func (*SchemaReaderWithCache) HeadVersion

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

HeadVersion - Finds the latest version of the schema.

func (*SchemaReaderWithCache) ReadEntityDefinition added in v0.5.0

func (r *SchemaReaderWithCache) ReadEntityDefinition(ctx context.Context, tenantID, entityName, version string) (definition *base.EntityDefinition, v string, err error)

ReadEntityDefinition - Read entity definition from the repository

func (*SchemaReaderWithCache) ReadRuleDefinition added in v0.5.0

func (r *SchemaReaderWithCache) ReadRuleDefinition(ctx context.Context, tenantID, ruleName, version string) (definition *base.RuleDefinition, v string, err error)

ReadRuleDefinition - Read rule definition from the repository

func (*SchemaReaderWithCache) ReadSchema

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

ReadSchema - Read schema from the repository

type SchemaReaderWithCircuitBreaker

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

SchemaReaderWithCircuitBreaker - Add circuit breaker behaviour to schema reader

func NewSchemaReaderWithCircuitBreaker

func NewSchemaReaderWithCircuitBreaker(delegate storage.SchemaReader) *SchemaReaderWithCircuitBreaker

NewSchemaReaderWithCircuitBreaker - Add circuit breaker behaviour to new schema reader

func (*SchemaReaderWithCircuitBreaker) HeadVersion

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

HeadVersion - Finds the latest version of the schema.

func (*SchemaReaderWithCircuitBreaker) ReadEntityDefinition added in v0.5.0

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

ReadEntityDefinition - Read entity definition from repository

func (*SchemaReaderWithCircuitBreaker) ReadRuleDefinition added in v0.5.0

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

ReadRuleDefinition - Read rule definition from repository

func (*SchemaReaderWithCircuitBreaker) ReadSchema

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

ReadSchema - Read schema from repository

type SchemaWriterWithCircuitBreaker

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

SchemaWriterWithCircuitBreaker - Add circuit breaker behaviour to schema writer

func NewSchemaWriterWithCircuitBreaker

func NewSchemaWriterWithCircuitBreaker(delegate storage.SchemaWriter) *SchemaWriterWithCircuitBreaker

NewSchemaWriterWithCircuitBreaker - Add circuit breaker behaviour to new schema writer

func (*SchemaWriterWithCircuitBreaker) WriteSchema

func (r *SchemaWriterWithCircuitBreaker) WriteSchema(ctx context.Context, definitions []storage.SchemaDefinition) error

WriteSchema - Write schema to repository

Jump to

Keyboard shortcuts

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