server: go.chromium.org/goma/server/cache/redis Index | Files

package redis

import "go.chromium.org/goma/server/cache/redis"

Package redis provides cache service by redis (cloud memorystore).

Index

Package Files

client.go doc.go

func AddrFromEnv Uses

func AddrFromEnv() (string, error)

AddrFromEnv returns redis server address from environment variables.

type Client Uses

type Client struct {
    // contains filtered or unexported fields
}

Client is cache service client for redis.

func NewClient Uses

func NewClient(ctx context.Context, addr, prefix string) Client

NewClient creates new cache client for redis.

func (Client) Close Uses

func (c Client) Close() error

Close releases the resources used by the client.

func (Client) Get Uses

func (c Client) Get(ctx context.Context, in *pb.GetReq, opts ...grpc.CallOption) (*pb.GetResp, error)

Get fetches value for the key from redis.

func (Client) Put Uses

func (c Client) Put(ctx context.Context, in *pb.PutReq, opts ...grpc.CallOption) (*pb.PutResp, error)

Put stores key:value pair on redis.

Package redis imports 10 packages (graph) and is imported by 3 packages. Updated 2019-07-13. Refresh now. Tools for package owners.