datastore

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithDatastore

func ContextWithDatastore(ctx context.Context, datastore datastore.Datastore) context.Context

ContextWithDatastore adds the handle and datastore in one step

func ContextWithHandle

func ContextWithHandle(ctx context.Context) context.Context

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

func FromContext

func FromContext(ctx context.Context) datastore.Datastore

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

func MustFromContext

func MustFromContext(ctx context.Context) datastore.Datastore

MustFromContext reads the selected datastore out of a context.Context and panics if it does not exist

func SetInContext

func SetInContext(ctx context.Context, datastore datastore.Datastore) error

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.

Jump to

Keyboard shortcuts

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