ext

package
v6.7.2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CassandraMiddleware

func CassandraMiddleware(name string, cfg *gocql.ClusterConfig) router.Middleware

CassandraMiddleware creates a Cassandra session and add it to the context

func CassandraStreamServerInterceptor

func CassandraStreamServerInterceptor(name string, cfg *gocql.ClusterConfig) grpc.StreamServerInterceptor

CassandraStreamServerInterceptor creates a Cassandra session and wraps it to context

func CassandraUnaryServerInterceptor

func CassandraUnaryServerInterceptor(name string, cfg *gocql.ClusterConfig) grpc.UnaryServerInterceptor

CassandraUnaryServerInterceptor creates a Cassandra session and add it to the context

func FromContextAny

func FromContextAny(ctx context.Context, key string) interface{}

FromContextAny returns from context the interface value to which the key is associated. NOTE DEPRECATED use server.FromContextAny

func MongoDBMiddleware

func MongoDBMiddleware(name string, cfg *mgo.DialInfo) router.Middleware

MongoDBMiddleware creates a MongoDB session and add it to the context

func MongoDBStreamServerInterceptor

func MongoDBStreamServerInterceptor(name string, cfg *mgo.DialInfo) grpc.StreamServerInterceptor

MongoDBStreamServerInterceptor reates a MongoDB session and wraps it to context

func MongoDBUnaryServerInterceptor

func MongoDBUnaryServerInterceptor(name string, cfg *mgo.DialInfo) grpc.UnaryServerInterceptor

MongoDBUnaryServerInterceptor creates a MongoDB session and add it to the context

func RedisMiddleware

func RedisMiddleware(name string, clt *redis.Client) router.Middleware

RedisMiddleware adds Redis client to the context. Note: Caller is responsile to close the redis connection when its done. It is rare to Close a Client, as the Client is meant to be long-lived and shared between many goroutines.

func RedisStreamServerInterceptor

func RedisStreamServerInterceptor(name string, clt *redis.Client) grpc.StreamServerInterceptor

RedisStreamServerInterceptor wrap redis client to grpc

func RedisUnaryServerInterceptor

func RedisUnaryServerInterceptor(name string, clt *redis.Client) grpc.UnaryServerInterceptor

RedisUnaryServerInterceptor wrap redis client to grpc Note: Caller is responsile to close the redis connection when its done. It is rare to Close a Client, as the Client is meant to be long-lived and shared between many goroutines.

func WithContextAny

func WithContextAny(ctx context.Context, key string, val interface{}) context.Context

WithContextAny returns a copy of parent ctx in which the value associated with key is val. NOTE DEPRECATED use server.WithContextAny

Types

This section is empty.

Jump to

Keyboard shortcuts

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