cache

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2020 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCacheServiceServer

func RegisterCacheServiceServer(s *grpc.Server, srv CacheServiceServer)

Types

type CacheServiceClient

type CacheServiceClient interface {
	Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*GetResp, error)
	Put(ctx context.Context, in *PutReq, opts ...grpc.CallOption) (*PutResp, error)
}

CacheServiceClient is the client API for CacheService service.

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

type CacheServiceServer

type CacheServiceServer interface {
	Get(context.Context, *GetReq) (*GetResp, error)
	Put(context.Context, *PutReq) (*PutResp, error)
}

CacheServiceServer is the server API for CacheService service.

type GetReq

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

func (*GetReq) Descriptor

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

func (*GetReq) GetFast

func (m *GetReq) GetFast() bool

func (*GetReq) GetKey

func (m *GetReq) GetKey() string

func (*GetReq) ProtoMessage

func (*GetReq) ProtoMessage()

func (*GetReq) Reset

func (m *GetReq) Reset()

func (*GetReq) String

func (m *GetReq) String() string

func (*GetReq) XXX_DiscardUnknown

func (m *GetReq) XXX_DiscardUnknown()

func (*GetReq) XXX_Marshal

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

func (*GetReq) XXX_Merge

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

func (*GetReq) XXX_Size

func (m *GetReq) XXX_Size() int

func (*GetReq) XXX_Unmarshal

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

type GetResp

type GetResp struct {
	Kv                   *KV      `protobuf:"bytes,1,opt,name=kv,proto3" json:"kv,omitempty"`
	InMemory             bool     `protobuf:"varint,2,opt,name=in_memory,json=inMemory,proto3" json:"in_memory,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetResp) Descriptor

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

func (*GetResp) GetInMemory

func (m *GetResp) GetInMemory() bool

func (*GetResp) GetKv

func (m *GetResp) GetKv() *KV

func (*GetResp) ProtoMessage

func (*GetResp) ProtoMessage()

func (*GetResp) Reset

func (m *GetResp) Reset()

func (*GetResp) String

func (m *GetResp) String() string

func (*GetResp) XXX_DiscardUnknown

func (m *GetResp) XXX_DiscardUnknown()

func (*GetResp) XXX_Marshal

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

func (*GetResp) XXX_Merge

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

func (*GetResp) XXX_Size

func (m *GetResp) XXX_Size() int

func (*GetResp) XXX_Unmarshal

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

type KV

type KV 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 (*KV) Descriptor

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

func (*KV) GetKey

func (m *KV) GetKey() string

func (*KV) GetValue

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

func (*KV) ProtoMessage

func (*KV) ProtoMessage()

func (*KV) Reset

func (m *KV) Reset()

func (*KV) String

func (m *KV) String() string

func (*KV) XXX_DiscardUnknown

func (m *KV) XXX_DiscardUnknown()

func (*KV) XXX_Marshal

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

func (*KV) XXX_Merge

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

func (*KV) XXX_Size

func (m *KV) XXX_Size() int

func (*KV) XXX_Unmarshal

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

type PutReq

type PutReq struct {
	Kv                   *KV      `protobuf:"bytes,1,opt,name=kv,proto3" json:"kv,omitempty"`
	WriteBack            bool     `protobuf:"varint,2,opt,name=write_back,json=writeBack,proto3" json:"write_back,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PutReq) Descriptor

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

func (*PutReq) GetKv

func (m *PutReq) GetKv() *KV

func (*PutReq) GetWriteBack

func (m *PutReq) GetWriteBack() bool

func (*PutReq) ProtoMessage

func (*PutReq) ProtoMessage()

func (*PutReq) Reset

func (m *PutReq) Reset()

func (*PutReq) String

func (m *PutReq) String() string

func (*PutReq) XXX_DiscardUnknown

func (m *PutReq) XXX_DiscardUnknown()

func (*PutReq) XXX_Marshal

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

func (*PutReq) XXX_Merge

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

func (*PutReq) XXX_Size

func (m *PutReq) XXX_Size() int

func (*PutReq) XXX_Unmarshal

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

type PutResp

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

func (*PutResp) Descriptor

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

func (*PutResp) ProtoMessage

func (*PutResp) ProtoMessage()

func (*PutResp) Reset

func (m *PutResp) Reset()

func (*PutResp) String

func (m *PutResp) String() string

func (*PutResp) XXX_DiscardUnknown

func (m *PutResp) XXX_DiscardUnknown()

func (*PutResp) XXX_Marshal

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

func (*PutResp) XXX_Merge

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

func (*PutResp) XXX_Size

func (m *PutResp) XXX_Size() int

func (*PutResp) XXX_Unmarshal

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

type UnimplementedCacheServiceServer added in v0.0.5

type UnimplementedCacheServiceServer struct {
}

UnimplementedCacheServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedCacheServiceServer) Get added in v0.0.5

func (*UnimplementedCacheServiceServer) Put added in v0.0.5

Jump to

Keyboard shortcuts

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