cache

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCacheServer

func RegisterCacheServer(s *grpc.Server, srv CacheServer)

Types

type CacheClient

type CacheClient interface {
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetReply, error)
	Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetReply, error)
}

CacheClient is the client API for Cache service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewCacheClient

func NewCacheClient(cc grpc.ClientConnInterface) CacheClient

type CacheServer

type CacheServer interface {
	Get(context.Context, *GetRequest) (*GetReply, error)
	Set(context.Context, *SetRequest) (*SetReply, error)
}

CacheServer is the server API for Cache service.

type GetReply

type GetReply struct {
	Exists               bool     `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"`
	Value                []byte   `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetReply) Descriptor

func (*GetReply) Descriptor() ([]byte, []int)

func (*GetReply) GetExists

func (m *GetReply) GetExists() bool

func (*GetReply) GetValue

func (m *GetReply) GetValue() []byte

func (*GetReply) ProtoMessage

func (*GetReply) ProtoMessage()

func (*GetReply) Reset

func (m *GetReply) Reset()

func (*GetReply) String

func (m *GetReply) String() string

func (*GetReply) XXX_DiscardUnknown

func (m *GetReply) XXX_DiscardUnknown()

func (*GetReply) XXX_Marshal

func (m *GetReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetReply) XXX_Merge

func (m *GetReply) XXX_Merge(src proto.Message)

func (*GetReply) XXX_Size

func (m *GetReply) XXX_Size() int

func (*GetReply) XXX_Unmarshal

func (m *GetReply) XXX_Unmarshal(b []byte) error

type GetRequest

type GetRequest struct {
	Key                  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetRequest) Descriptor

func (*GetRequest) Descriptor() ([]byte, []int)

func (*GetRequest) GetKey

func (m *GetRequest) GetKey() string

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) Reset

func (m *GetRequest) Reset()

func (*GetRequest) String

func (m *GetRequest) String() string

func (*GetRequest) XXX_DiscardUnknown

func (m *GetRequest) XXX_DiscardUnknown()

func (*GetRequest) XXX_Marshal

func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetRequest) XXX_Merge

func (m *GetRequest) XXX_Merge(src proto.Message)

func (*GetRequest) XXX_Size

func (m *GetRequest) XXX_Size() int

func (*GetRequest) XXX_Unmarshal

func (m *GetRequest) XXX_Unmarshal(b []byte) error

type SetReply

type SetReply struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SetReply) Descriptor

func (*SetReply) Descriptor() ([]byte, []int)

func (*SetReply) ProtoMessage

func (*SetReply) ProtoMessage()

func (*SetReply) Reset

func (m *SetReply) Reset()

func (*SetReply) String

func (m *SetReply) String() string

func (*SetReply) XXX_DiscardUnknown

func (m *SetReply) XXX_DiscardUnknown()

func (*SetReply) XXX_Marshal

func (m *SetReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SetReply) XXX_Merge

func (m *SetReply) XXX_Merge(src proto.Message)

func (*SetReply) XXX_Size

func (m *SetReply) XXX_Size() int

func (*SetReply) XXX_Unmarshal

func (m *SetReply) XXX_Unmarshal(b []byte) error

type SetRequest

type SetRequest struct {
	Key                  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value                []byte   `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SetRequest) Descriptor

func (*SetRequest) Descriptor() ([]byte, []int)

func (*SetRequest) GetKey

func (m *SetRequest) GetKey() string

func (*SetRequest) GetValue

func (m *SetRequest) GetValue() []byte

func (*SetRequest) ProtoMessage

func (*SetRequest) ProtoMessage()

func (*SetRequest) Reset

func (m *SetRequest) Reset()

func (*SetRequest) String

func (m *SetRequest) String() string

func (*SetRequest) XXX_DiscardUnknown

func (m *SetRequest) XXX_DiscardUnknown()

func (*SetRequest) XXX_Marshal

func (m *SetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SetRequest) XXX_Merge

func (m *SetRequest) XXX_Merge(src proto.Message)

func (*SetRequest) XXX_Size

func (m *SetRequest) XXX_Size() int

func (*SetRequest) XXX_Unmarshal

func (m *SetRequest) XXX_Unmarshal(b []byte) error

type UnimplementedCacheServer

type UnimplementedCacheServer struct {
}

UnimplementedCacheServer can be embedded to have forward compatible implementations.

func (*UnimplementedCacheServer) Get

func (*UnimplementedCacheServer) Set

Directories

Path Synopsis
Package client implements a gRPC client for the cache service.
Package client implements a gRPC client for the cache service.

Jump to

Keyboard shortcuts

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