Documentation ¶
Index ¶
- func CassandraMiddleware(name string, cfg *gocql.ClusterConfig) router.Middleware
- func CassandraStreamServerInterceptor(name string, cfg *gocql.ClusterConfig) grpc.StreamServerInterceptor
- func CassandraUnaryServerInterceptor(name string, cfg *gocql.ClusterConfig) grpc.UnaryServerInterceptor
- func FromContextAny(ctx context.Context, key string) interface{}
- func MongoDBMiddleware(name string, cfg *mgo.DialInfo) router.Middleware
- func MongoDBStreamServerInterceptor(name string, cfg *mgo.DialInfo) grpc.StreamServerInterceptor
- func MongoDBUnaryServerInterceptor(name string, cfg *mgo.DialInfo) grpc.UnaryServerInterceptor
- func RedisMiddleware(name string, clt *redis.Client) router.Middleware
- func RedisStreamServerInterceptor(name string, clt *redis.Client) grpc.StreamServerInterceptor
- func RedisUnaryServerInterceptor(name string, clt *redis.Client) grpc.UnaryServerInterceptor
- func WithContextAny(ctx context.Context, key string, val interface{}) context.Context
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 ¶
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.
Types ¶
This section is empty.