Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterKeyValueDBServer(s grpc.ServiceRegistrar, srv KeyValueDBServer)
- type GetValueRequest
- type GetValueResponse
- func (*GetValueResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetValueResponse) GetContents() isGetValueResponse_Contents
- func (x *GetValueResponse) GetError() *ResponseError
- func (x *GetValueResponse) GetOutcome() GetValueResponse_Outcome
- func (x *GetValueResponse) GetValue() *Value
- func (*GetValueResponse) ProtoMessage()
- func (x *GetValueResponse) ProtoReflect() protoreflect.Message
- func (x *GetValueResponse) Reset()
- func (x *GetValueResponse) String() string
- type GetValueResponse_Error
- type GetValueResponse_Outcome
- func (GetValueResponse_Outcome) Descriptor() protoreflect.EnumDescriptor
- func (x GetValueResponse_Outcome) Enum() *GetValueResponse_Outcome
- func (GetValueResponse_Outcome) EnumDescriptor() ([]byte, []int)deprecated
- func (x GetValueResponse_Outcome) Number() protoreflect.EnumNumber
- func (x GetValueResponse_Outcome) String() string
- func (GetValueResponse_Outcome) Type() protoreflect.EnumType
- type GetValueResponse_Value
- type KeyValueDBClient
- type KeyValueDBServer
- type PutValueRequest
- func (*PutValueRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PutValueRequest) GetKey() []byte
- func (x *PutValueRequest) GetValue() *Value
- func (*PutValueRequest) ProtoMessage()
- func (x *PutValueRequest) ProtoReflect() protoreflect.Message
- func (x *PutValueRequest) Reset()
- func (x *PutValueRequest) String() string
- type PutValueResponse
- type ResponseError
- type UnimplementedKeyValueDBServer
- type UnsafeKeyValueDBServer
- type Value
Constants ¶
const ( KeyValueDB_GetValue_FullMethodName = "/compilation_cache_service.keyvalue.v1.KeyValueDB/GetValue" KeyValueDB_PutValue_FullMethodName = "/compilation_cache_service.keyvalue.v1.KeyValueDB/PutValue" )
Variables ¶
var ( GetValueResponse_Outcome_name = map[int32]string{ 0: "ERROR", 1: "KEY_NOT_FOUND", 2: "SUCCESS", } GetValueResponse_Outcome_value = map[string]int32{ "ERROR": 0, "KEY_NOT_FOUND": 1, "SUCCESS": 2, } )
Enum value maps for GetValueResponse_Outcome.
var File_llvm_kv_compilation_caching_kv_proto protoreflect.FileDescriptor
var KeyValueDB_ServiceDesc = grpc.ServiceDesc{ ServiceName: "compilation_cache_service.keyvalue.v1.KeyValueDB", HandlerType: (*KeyValueDBServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetValue", Handler: _KeyValueDB_GetValue_Handler, }, { MethodName: "PutValue", Handler: _KeyValueDB_PutValue_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "llvm/kv/compilation_caching_kv.proto", }
KeyValueDB_ServiceDesc is the grpc.ServiceDesc for KeyValueDB service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterKeyValueDBServer ¶
func RegisterKeyValueDBServer(s grpc.ServiceRegistrar, srv KeyValueDBServer)
Types ¶
type GetValueRequest ¶
type GetValueRequest struct { Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*GetValueRequest) Descriptor
deprecated
func (*GetValueRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetValueRequest.ProtoReflect.Descriptor instead.
func (*GetValueRequest) GetKey ¶
func (x *GetValueRequest) GetKey() []byte
func (*GetValueRequest) ProtoMessage ¶
func (*GetValueRequest) ProtoMessage()
func (*GetValueRequest) ProtoReflect ¶
func (x *GetValueRequest) ProtoReflect() protoreflect.Message
func (*GetValueRequest) Reset ¶
func (x *GetValueRequest) Reset()
func (*GetValueRequest) String ¶
func (x *GetValueRequest) String() string
type GetValueResponse ¶
type GetValueResponse struct { Outcome GetValueResponse_Outcome `` /* 136-byte string literal not displayed */ // Types that are valid to be assigned to Contents: // // *GetValueResponse_Error // *GetValueResponse_Value Contents isGetValueResponse_Contents `protobuf_oneof:"contents"` // contains filtered or unexported fields }
func (*GetValueResponse) Descriptor
deprecated
func (*GetValueResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetValueResponse.ProtoReflect.Descriptor instead.
func (*GetValueResponse) GetContents ¶
func (x *GetValueResponse) GetContents() isGetValueResponse_Contents
func (*GetValueResponse) GetError ¶
func (x *GetValueResponse) GetError() *ResponseError
func (*GetValueResponse) GetOutcome ¶
func (x *GetValueResponse) GetOutcome() GetValueResponse_Outcome
func (*GetValueResponse) GetValue ¶
func (x *GetValueResponse) GetValue() *Value
func (*GetValueResponse) ProtoMessage ¶
func (*GetValueResponse) ProtoMessage()
func (*GetValueResponse) ProtoReflect ¶
func (x *GetValueResponse) ProtoReflect() protoreflect.Message
func (*GetValueResponse) Reset ¶
func (x *GetValueResponse) Reset()
func (*GetValueResponse) String ¶
func (x *GetValueResponse) String() string
type GetValueResponse_Error ¶
type GetValueResponse_Error struct {
Error *ResponseError `protobuf:"bytes,2,opt,name=error,proto3,oneof"`
}
type GetValueResponse_Outcome ¶
type GetValueResponse_Outcome int32
const ( GetValueResponse_ERROR GetValueResponse_Outcome = 0 // if unset, we'll get error GetValueResponse_KEY_NOT_FOUND GetValueResponse_Outcome = 1 GetValueResponse_SUCCESS GetValueResponse_Outcome = 2 )
func (GetValueResponse_Outcome) Descriptor ¶
func (GetValueResponse_Outcome) Descriptor() protoreflect.EnumDescriptor
func (GetValueResponse_Outcome) Enum ¶
func (x GetValueResponse_Outcome) Enum() *GetValueResponse_Outcome
func (GetValueResponse_Outcome) EnumDescriptor
deprecated
func (GetValueResponse_Outcome) EnumDescriptor() ([]byte, []int)
Deprecated: Use GetValueResponse_Outcome.Descriptor instead.
func (GetValueResponse_Outcome) Number ¶
func (x GetValueResponse_Outcome) Number() protoreflect.EnumNumber
func (GetValueResponse_Outcome) String ¶
func (x GetValueResponse_Outcome) String() string
func (GetValueResponse_Outcome) Type ¶
func (GetValueResponse_Outcome) Type() protoreflect.EnumType
type GetValueResponse_Value ¶
type GetValueResponse_Value struct {
Value *Value `protobuf:"bytes,3,opt,name=value,proto3,oneof"`
}
type KeyValueDBClient ¶
type KeyValueDBClient interface { GetValue(ctx context.Context, in *GetValueRequest, opts ...grpc.CallOption) (*GetValueResponse, error) PutValue(ctx context.Context, in *PutValueRequest, opts ...grpc.CallOption) (*PutValueResponse, error) }
KeyValueDBClient is the client API for KeyValueDB service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
Interface exported by the service.
func NewKeyValueDBClient ¶
func NewKeyValueDBClient(cc grpc.ClientConnInterface) KeyValueDBClient
type KeyValueDBServer ¶
type KeyValueDBServer interface { GetValue(context.Context, *GetValueRequest) (*GetValueResponse, error) PutValue(context.Context, *PutValueRequest) (*PutValueResponse, error) // contains filtered or unexported methods }
KeyValueDBServer is the server API for KeyValueDB service. All implementations must embed UnimplementedKeyValueDBServer for forward compatibility.
Interface exported by the service.
type PutValueRequest ¶
type PutValueRequest struct { Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value *Value `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*PutValueRequest) Descriptor
deprecated
func (*PutValueRequest) Descriptor() ([]byte, []int)
Deprecated: Use PutValueRequest.ProtoReflect.Descriptor instead.
func (*PutValueRequest) GetKey ¶
func (x *PutValueRequest) GetKey() []byte
func (*PutValueRequest) GetValue ¶
func (x *PutValueRequest) GetValue() *Value
func (*PutValueRequest) ProtoMessage ¶
func (*PutValueRequest) ProtoMessage()
func (*PutValueRequest) ProtoReflect ¶
func (x *PutValueRequest) ProtoReflect() protoreflect.Message
func (*PutValueRequest) Reset ¶
func (x *PutValueRequest) Reset()
func (*PutValueRequest) String ¶
func (x *PutValueRequest) String() string
type PutValueResponse ¶
type PutValueResponse struct { Error *ResponseError `protobuf:"bytes,1,opt,name=error,proto3,oneof" json:"error,omitempty"` // contains filtered or unexported fields }
func (*PutValueResponse) Descriptor
deprecated
func (*PutValueResponse) Descriptor() ([]byte, []int)
Deprecated: Use PutValueResponse.ProtoReflect.Descriptor instead.
func (*PutValueResponse) GetError ¶
func (x *PutValueResponse) GetError() *ResponseError
func (*PutValueResponse) ProtoMessage ¶
func (*PutValueResponse) ProtoMessage()
func (*PutValueResponse) ProtoReflect ¶
func (x *PutValueResponse) ProtoReflect() protoreflect.Message
func (*PutValueResponse) Reset ¶
func (x *PutValueResponse) Reset()
func (*PutValueResponse) String ¶
func (x *PutValueResponse) String() string
type ResponseError ¶
type ResponseError struct { Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` // contains filtered or unexported fields }
func (*ResponseError) Descriptor
deprecated
func (*ResponseError) Descriptor() ([]byte, []int)
Deprecated: Use ResponseError.ProtoReflect.Descriptor instead.
func (*ResponseError) GetDescription ¶
func (x *ResponseError) GetDescription() string
func (*ResponseError) ProtoMessage ¶
func (*ResponseError) ProtoMessage()
func (*ResponseError) ProtoReflect ¶
func (x *ResponseError) ProtoReflect() protoreflect.Message
func (*ResponseError) Reset ¶
func (x *ResponseError) Reset()
func (*ResponseError) String ¶
func (x *ResponseError) String() string
type UnimplementedKeyValueDBServer ¶
type UnimplementedKeyValueDBServer struct{}
UnimplementedKeyValueDBServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedKeyValueDBServer) GetValue ¶
func (UnimplementedKeyValueDBServer) GetValue(context.Context, *GetValueRequest) (*GetValueResponse, error)
func (UnimplementedKeyValueDBServer) PutValue ¶
func (UnimplementedKeyValueDBServer) PutValue(context.Context, *PutValueRequest) (*PutValueResponse, error)
type UnsafeKeyValueDBServer ¶
type UnsafeKeyValueDBServer interface {
// contains filtered or unexported methods
}
UnsafeKeyValueDBServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to KeyValueDBServer will result in compilation errors.
type Value ¶
type Value struct { Entries map[string][]byte `` /* 141-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Value) Descriptor
deprecated
func (*Value) GetEntries ¶
func (*Value) ProtoMessage ¶
func (*Value) ProtoMessage()
func (*Value) ProtoReflect ¶
func (x *Value) ProtoReflect() protoreflect.Message