Documentation
¶
Index ¶
- func AddRevisionToContext(ctx context.Context, req interface{}, ds datastore.Datastore) (context.Context, error)
- func MustRevisionFromContext(ctx context.Context) (decimal.Decimal, *v1.ZedToken)
- func RevisionFromContext(ctx context.Context) *decimal.Decimal
- func StreamServerInterceptor(ds datastore.Datastore) grpc.StreamServerInterceptor
- func UnaryServerInterceptor(ds datastore.Datastore) grpc.UnaryServerInterceptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRevisionToContext ¶
func AddRevisionToContext(ctx context.Context, req interface{}, ds datastore.Datastore) (context.Context, error)
AddRevisionToContext adds a revision to the given context, based on the consistency block found in the given request (if applicable).
func MustRevisionFromContext ¶
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 ¶
RevisionFromContext reads the selected revision out of a context.Context and returns nil if it does not exist.
func StreamServerInterceptor ¶
func StreamServerInterceptor(ds datastore.Datastore) 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(ds datastore.Datastore) 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.