decorators

package
v0.6.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BundleReaderWithCircuitBreaker added in v0.6.0

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

BundleReaderWithCircuitBreaker - Add circuit breaker behaviour to bundle reader

func NewBundleReaderWithCircuitBreaker added in v0.6.0

func NewBundleReaderWithCircuitBreaker(delegate storage.BundleReader, timeout int) *BundleReaderWithCircuitBreaker

NewBundleReaderWithCircuitBreaker - Add circuit breaker behaviour to new bundle reader

func (*BundleReaderWithCircuitBreaker) Read added in v0.6.0

func (r *BundleReaderWithCircuitBreaker) Read(ctx context.Context, tenantID, name string) (bundle *base.DataBundle, err error)

Read - Reads bundles from the repository

type BundleWriterWithCircuitBreaker added in v0.6.0

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

BundleWriterWithCircuitBreaker - Add circuit breaker behaviour to bundle writer

func NewBundleWriterWithCircuitBreaker added in v0.6.0

func NewBundleWriterWithCircuitBreaker(delegate storage.BundleWriter, timeout int) *BundleWriterWithCircuitBreaker

NewBundleWriterWithCircuitBreaker - Add circuit breaker behaviour to new bundle writer

func (*BundleWriterWithCircuitBreaker) Delete added in v0.6.0

func (r *BundleWriterWithCircuitBreaker) Delete(ctx context.Context, tenantID, name string) (err error)

Delete - Delete bundles from the repository

func (*BundleWriterWithCircuitBreaker) Write added in v0.6.0

func (r *BundleWriterWithCircuitBreaker) Write(ctx context.Context, tenantID string, bundles []*base.DataBundle) (names []string, err error)

Write - Write bundles from the repository

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, timeout int) *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, timeout int) *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) RunBundle added in v0.6.0

func (r *DataWriterWithCircuitBreaker) RunBundle(ctx context.Context, tenantID string, arguments map[string]string, b *base.DataBundle) (token.EncodedSnapToken, error)

RunBundle -

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, timeout int) *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, timeout int) *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

type TenantReaderWithCircuitBreaker added in v0.6.0

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

TenantReaderWithCircuitBreaker - Add circuit breaker behaviour to tenant reader

func NewTenantReaderWithCircuitBreaker added in v0.6.0

func NewTenantReaderWithCircuitBreaker(delegate storage.TenantReader, timeout int) *TenantReaderWithCircuitBreaker

NewTenantReaderWithCircuitBreaker - Add circuit breaker behaviour to new tenant reader

func (*TenantReaderWithCircuitBreaker) ListTenants added in v0.6.0

func (r *TenantReaderWithCircuitBreaker) ListTenants(ctx context.Context, pagination database.Pagination) (tenants []*base.Tenant, ct database.EncodedContinuousToken, err error)

ListTenants - List tenants from the repository

type TenantWriterWithCircuitBreaker added in v0.6.0

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

TenantWriterWithCircuitBreaker - Add circuit breaker behaviour to tenant writer

func NewTenantWriterWithCircuitBreaker added in v0.6.0

func NewTenantWriterWithCircuitBreaker(delegate storage.TenantWriter, timeout int) *TenantWriterWithCircuitBreaker

NewTenantWriterWithCircuitBreaker - Add circuit breaker behaviour to new bundle reader

func (*TenantWriterWithCircuitBreaker) CreateTenant added in v0.6.0

func (r *TenantWriterWithCircuitBreaker) CreateTenant(ctx context.Context, id, name string) (result *base.Tenant, err error)

CreateTenant - Create tenant from the repository

func (*TenantWriterWithCircuitBreaker) DeleteTenant added in v0.6.0

func (r *TenantWriterWithCircuitBreaker) DeleteTenant(ctx context.Context, tenantID string) (result *base.Tenant, err error)

DeleteTenant - Delete tenant from the repository

Jump to

Keyboard shortcuts

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