consistency

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRevisionToContext

func AddRevisionToContext(ctx context.Context, req interface{}, ds datastore.Datastore) error

AddRevisionToContext adds a revision to the given context, based on the consistency block found in the given request (if applicable).

func ContextWithHandle added in v1.5.0

func ContextWithHandle(ctx context.Context) context.Context

ContextWithHandle adds a placeholder to a context that will later be filled by the revision

func MustRevisionFromContext

func MustRevisionFromContext(ctx context.Context) (decimal.Decimal, *v1.ZedToken)

MustRevisionFromContext reads the selected revision out of a context.Context, computes a zedtoken from it, and panics if it has not been set on the context.

func RevisionFromContext

func RevisionFromContext(ctx context.Context) *decimal.Decimal

RevisionFromContext reads the selected revision out of a context.Context and returns nil if it does not exist.

func StreamServerInterceptor

func StreamServerInterceptor() grpc.StreamServerInterceptor

StreamServerInterceptor returns a new stream server interceptor that performs per-request exchange of the specified consistency configuration for the revision at which to perform the request.

func UnaryServerInterceptor

func UnaryServerInterceptor() grpc.UnaryServerInterceptor

UnaryServerInterceptor returns a new unary server interceptor that performs per-request exchange of the specified consistency configuration for the revision at which to perform the request.

Types

This section is empty.

Jump to

Keyboard shortcuts

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