Back to godoc.org

Package cache

v0.0.15
Latest Go to latest

The latest major version is .

Published: Jul 31, 2020 | License: BSD-3-Clause | Module: go.chromium.org/goma/server

Index

Variables

var File_cache_cache_proto protoreflect.FileDescriptor
var File_cache_cache_service_proto protoreflect.FileDescriptor

func RegisterCacheServiceServer

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

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"`
	// contains filtered or unexported fields
}

func (*GetReq) Descriptor

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

Deprecated: Use GetReq.ProtoReflect.Descriptor instead.

func (*GetReq) GetFast

func (x *GetReq) GetFast() bool

func (*GetReq) GetKey

func (x *GetReq) GetKey() string

func (*GetReq) ProtoMessage

func (*GetReq) ProtoMessage()

func (*GetReq) ProtoReflect

func (x *GetReq) ProtoReflect() protoreflect.Message

func (*GetReq) Reset

func (x *GetReq) Reset()

func (*GetReq) String

func (x *GetReq) String() string

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"`
	// contains filtered or unexported fields
}

func (*GetResp) Descriptor

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

Deprecated: Use GetResp.ProtoReflect.Descriptor instead.

func (*GetResp) GetInMemory

func (x *GetResp) GetInMemory() bool

func (*GetResp) GetKv

func (x *GetResp) GetKv() *KV

func (*GetResp) ProtoMessage

func (*GetResp) ProtoMessage()

func (*GetResp) ProtoReflect

func (x *GetResp) ProtoReflect() protoreflect.Message

func (*GetResp) Reset

func (x *GetResp) Reset()

func (*GetResp) String

func (x *GetResp) String() string

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"`
	// contains filtered or unexported fields
}

func (*KV) Descriptor

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

Deprecated: Use KV.ProtoReflect.Descriptor instead.

func (*KV) GetKey

func (x *KV) GetKey() string

func (*KV) GetValue

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

func (*KV) ProtoMessage

func (*KV) ProtoMessage()

func (*KV) ProtoReflect

func (x *KV) ProtoReflect() protoreflect.Message

func (*KV) Reset

func (x *KV) Reset()

func (*KV) String

func (x *KV) String() string

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"`
	// contains filtered or unexported fields
}

func (*PutReq) Descriptor

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

Deprecated: Use PutReq.ProtoReflect.Descriptor instead.

func (*PutReq) GetKv

func (x *PutReq) GetKv() *KV

func (*PutReq) GetWriteBack

func (x *PutReq) GetWriteBack() bool

func (*PutReq) ProtoMessage

func (*PutReq) ProtoMessage()

func (*PutReq) ProtoReflect

func (x *PutReq) ProtoReflect() protoreflect.Message

func (*PutReq) Reset

func (x *PutReq) Reset()

func (*PutReq) String

func (x *PutReq) String() string

type PutResp

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

func (*PutResp) Descriptor

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

Deprecated: Use PutResp.ProtoReflect.Descriptor instead.

func (*PutResp) ProtoMessage

func (*PutResp) ProtoMessage()

func (*PutResp) ProtoReflect

func (x *PutResp) ProtoReflect() protoreflect.Message

func (*PutResp) Reset

func (x *PutResp) Reset()

func (*PutResp) String

func (x *PutResp) String() string

type UnimplementedCacheServiceServer

type UnimplementedCacheServiceServer struct {
}

UnimplementedCacheServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedCacheServiceServer) Get

func (*UnimplementedCacheServiceServer) Get(context.Context, *GetReq) (*GetResp, error)

func (*UnimplementedCacheServiceServer) Put

func (*UnimplementedCacheServiceServer) Put(context.Context, *PutReq) (*PutResp, error)

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier