Documentation
¶
Overview ¶
Package datastore defines middleware that injects the datastore into the context.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromContext ¶
FromContext reads the selected datastore out of a context.Context and returns nil if it does not exist.
func MustFromContext ¶
MustFromContext reads the selected datastore out of a context.Context, computes a zedtoken from it, and panics if it has not been set on the context.
func StreamCountingInterceptor ¶ added in v1.48.0
func StreamCountingInterceptor() grpc.StreamServerInterceptor
StreamCountingInterceptor wraps the datastore with a counting proxy for stream requests. After each stream completes, it exports the method call counts to Prometheus metrics.
func UnaryCountingInterceptor ¶ added in v1.48.0
func UnaryCountingInterceptor() grpc.UnaryServerInterceptor
UnaryCountingInterceptor wraps the datastore with a counting proxy for unary requests. After each request completes, it exports the method call counts to Prometheus metrics.
Types ¶
This section is empty.