Documentation ¶
Index ¶
- func ContextWithDatastore(ctx context.Context, datastore datastore.Datastore) context.Context
- func ContextWithHandle(ctx context.Context) context.Context
- func FromContext(ctx context.Context) datastore.Datastore
- func MustFromContext(ctx context.Context) datastore.Datastore
- func SetInContext(ctx context.Context, datastore datastore.Datastore) error
- func StreamServerInterceptor(datastore datastore.Datastore) grpc.StreamServerInterceptor
- func UnaryServerInterceptor(datastore datastore.Datastore) grpc.UnaryServerInterceptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithDatastore ¶
ContextWithDatastore adds the handle and datastore in one step
func ContextWithHandle ¶
ContextWithHandle adds a placeholder to a context that will later be filled by the datastore
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 and panics if it does not exist
func SetInContext ¶
SetInContext adds a datastore to the given context
func StreamServerInterceptor ¶
func StreamServerInterceptor(datastore datastore.Datastore) grpc.StreamServerInterceptor
StreamServerInterceptor returns a new stream server interceptor that adds the datastore to the context
func UnaryServerInterceptor ¶
func UnaryServerInterceptor(datastore datastore.Datastore) grpc.UnaryServerInterceptor
UnaryServerInterceptor returns a new unary server interceptor that adds the datastore to the context
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.