Documentation ¶
Index ¶
- Variables
- func AddRevisionToContext(ctx context.Context, req interface{}, ds datastore.Datastore) error
- func ContextWithHandle(ctx context.Context) context.Context
- func RevisionFromContext(ctx context.Context) (datastore.Revision, *v1.ZedToken, error)
- func StreamServerInterceptor() grpc.StreamServerInterceptor
- func UnaryServerInterceptor() grpc.UnaryServerInterceptor
Constants ¶
This section is empty.
Variables ¶
var ConsistentyCounter = promauto.NewCounterVec(prometheus.CounterOpts{ Namespace: "spicedb", Subsystem: "middleware", Name: "consistency_assigned_total", Help: "Count of the consistencies used per request", }, []string{"method", "source"})
Functions ¶
func AddRevisionToContext ¶
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
ContextWithHandle adds a placeholder to a context that will later be filled by the revision
func RevisionFromContext ¶
RevisionFromContext reads the selected revision out of a context.Context, computes a zedtoken from it, and returns an error if it has not been set on the context.
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.