Documentation
¶
Index ¶
- Variables
- func RegisterStorageServer(s grpc.ServiceRegistrar, srv StorageServer)
- type GetRequest
- type GetResponse
- type PutRequest
- func (*PutRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PutRequest) GetKey() string
- func (x *PutRequest) GetPrimary() bool
- func (x *PutRequest) GetValue() *VersionedValue
- func (*PutRequest) ProtoMessage()
- func (x *PutRequest) ProtoReflect() protoreflect.Message
- func (x *PutRequest) Reset()
- func (x *PutRequest) String() string
- type PutResponse
- type ScanRequest
- type ScanResponse
- func (*ScanResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ScanResponse) GetKey() string
- func (x *ScanResponse) GetValue() []*VersionedValue
- func (*ScanResponse) ProtoMessage()
- func (x *ScanResponse) ProtoReflect() protoreflect.Message
- func (x *ScanResponse) Reset()
- func (x *ScanResponse) String() string
- type StorageClient
- type StorageServer
- type Storage_ScanClient
- type Storage_ScanServer
- type UnimplementedStorageServer
- type UnsafeStorageServer
- type VersionedValue
- func (*VersionedValue) Descriptor() ([]byte, []int)deprecated
- func (x *VersionedValue) GetData() []byte
- func (x *VersionedValue) GetTombstone() bool
- func (x *VersionedValue) GetVersion() string
- func (*VersionedValue) ProtoMessage()
- func (x *VersionedValue) ProtoReflect() protoreflect.Message
- func (x *VersionedValue) Reset()
- func (x *VersionedValue) String() string
Constants ¶
This section is empty.
Variables ¶
var File_storage_proto_storage_proto protoreflect.FileDescriptor
var Storage_ServiceDesc = grpc.ServiceDesc{ ServiceName: "storage.Storage", HandlerType: (*StorageServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _Storage_Get_Handler, }, { MethodName: "Put", Handler: _Storage_Put_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Scan", Handler: _Storage_Scan_Handler, ServerStreams: true, }, }, Metadata: "storage/proto/storage.proto", }
Storage_ServiceDesc is the grpc.ServiceDesc for Storage service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterStorageServer ¶
func RegisterStorageServer(s grpc.ServiceRegistrar, srv StorageServer)
Types ¶
type GetRequest ¶
type GetRequest struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetKey ¶
func (x *GetRequest) GetKey() string
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
type GetResponse ¶
type GetResponse struct { Value []*VersionedValue `protobuf:"bytes,2,rep,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*GetResponse) Descriptor
deprecated
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetValue ¶
func (x *GetResponse) GetValue() []*VersionedValue
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) ProtoReflect ¶
func (x *GetResponse) ProtoReflect() protoreflect.Message
func (*GetResponse) Reset ¶
func (x *GetResponse) Reset()
func (*GetResponse) String ¶
func (x *GetResponse) String() string
type PutRequest ¶
type PutRequest struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Primary bool `protobuf:"varint,2,opt,name=primary,proto3" json:"primary,omitempty"` Value *VersionedValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*PutRequest) Descriptor
deprecated
func (*PutRequest) Descriptor() ([]byte, []int)
Deprecated: Use PutRequest.ProtoReflect.Descriptor instead.
func (*PutRequest) GetKey ¶
func (x *PutRequest) GetKey() string
func (*PutRequest) GetPrimary ¶
func (x *PutRequest) GetPrimary() bool
func (*PutRequest) GetValue ¶
func (x *PutRequest) GetValue() *VersionedValue
func (*PutRequest) ProtoMessage ¶
func (*PutRequest) ProtoMessage()
func (*PutRequest) ProtoReflect ¶
func (x *PutRequest) ProtoReflect() protoreflect.Message
func (*PutRequest) Reset ¶
func (x *PutRequest) Reset()
func (*PutRequest) String ¶
func (x *PutRequest) String() string
type PutResponse ¶
type PutResponse struct { Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` // contains filtered or unexported fields }
func (*PutResponse) Descriptor
deprecated
func (*PutResponse) Descriptor() ([]byte, []int)
Deprecated: Use PutResponse.ProtoReflect.Descriptor instead.
func (*PutResponse) GetVersion ¶
func (x *PutResponse) GetVersion() string
func (*PutResponse) ProtoMessage ¶
func (*PutResponse) ProtoMessage()
func (*PutResponse) ProtoReflect ¶
func (x *PutResponse) ProtoReflect() protoreflect.Message
func (*PutResponse) Reset ¶
func (x *PutResponse) Reset()
func (*PutResponse) String ¶
func (x *PutResponse) String() string
type ScanRequest ¶
type ScanRequest struct { StartKey string `protobuf:"bytes,1,opt,name=start_key,json=startKey,proto3" json:"start_key,omitempty"` // contains filtered or unexported fields }
func (*ScanRequest) Descriptor
deprecated
func (*ScanRequest) Descriptor() ([]byte, []int)
Deprecated: Use ScanRequest.ProtoReflect.Descriptor instead.
func (*ScanRequest) GetStartKey ¶
func (x *ScanRequest) GetStartKey() string
func (*ScanRequest) ProtoMessage ¶
func (*ScanRequest) ProtoMessage()
func (*ScanRequest) ProtoReflect ¶
func (x *ScanRequest) ProtoReflect() protoreflect.Message
func (*ScanRequest) Reset ¶
func (x *ScanRequest) Reset()
func (*ScanRequest) String ¶
func (x *ScanRequest) String() string
type ScanResponse ¶
type ScanResponse struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value []*VersionedValue `protobuf:"bytes,2,rep,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*ScanResponse) Descriptor
deprecated
func (*ScanResponse) Descriptor() ([]byte, []int)
Deprecated: Use ScanResponse.ProtoReflect.Descriptor instead.
func (*ScanResponse) GetKey ¶
func (x *ScanResponse) GetKey() string
func (*ScanResponse) GetValue ¶
func (x *ScanResponse) GetValue() []*VersionedValue
func (*ScanResponse) ProtoMessage ¶
func (*ScanResponse) ProtoMessage()
func (*ScanResponse) ProtoReflect ¶
func (x *ScanResponse) ProtoReflect() protoreflect.Message
func (*ScanResponse) Reset ¶
func (x *ScanResponse) Reset()
func (*ScanResponse) String ¶
func (x *ScanResponse) String() string
type StorageClient ¶
type StorageClient interface { Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error) Scan(ctx context.Context, in *ScanRequest, opts ...grpc.CallOption) (Storage_ScanClient, error) }
StorageClient is the client API for Storage 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.
func NewStorageClient ¶
func NewStorageClient(cc grpc.ClientConnInterface) StorageClient
type StorageServer ¶
type StorageServer interface { Get(context.Context, *GetRequest) (*GetResponse, error) Put(context.Context, *PutRequest) (*PutResponse, error) Scan(*ScanRequest, Storage_ScanServer) error // contains filtered or unexported methods }
StorageServer is the server API for Storage service. All implementations must embed UnimplementedStorageServer for forward compatibility
type Storage_ScanClient ¶
type Storage_ScanClient interface { Recv() (*ScanResponse, error) grpc.ClientStream }
type Storage_ScanServer ¶
type Storage_ScanServer interface { Send(*ScanResponse) error grpc.ServerStream }
type UnimplementedStorageServer ¶
type UnimplementedStorageServer struct { }
UnimplementedStorageServer must be embedded to have forward compatible implementations.
func (UnimplementedStorageServer) Get ¶
func (UnimplementedStorageServer) Get(context.Context, *GetRequest) (*GetResponse, error)
func (UnimplementedStorageServer) Put ¶
func (UnimplementedStorageServer) Put(context.Context, *PutRequest) (*PutResponse, error)
func (UnimplementedStorageServer) Scan ¶
func (UnimplementedStorageServer) Scan(*ScanRequest, Storage_ScanServer) error
type UnsafeStorageServer ¶
type UnsafeStorageServer interface {
// contains filtered or unexported methods
}
UnsafeStorageServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StorageServer will result in compilation errors.
type VersionedValue ¶
type VersionedValue struct { Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` Tombstone bool `protobuf:"varint,2,opt,name=tombstone,proto3" json:"tombstone,omitempty"` Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*VersionedValue) Descriptor
deprecated
func (*VersionedValue) Descriptor() ([]byte, []int)
Deprecated: Use VersionedValue.ProtoReflect.Descriptor instead.
func (*VersionedValue) GetData ¶
func (x *VersionedValue) GetData() []byte
func (*VersionedValue) GetTombstone ¶
func (x *VersionedValue) GetTombstone() bool
func (*VersionedValue) GetVersion ¶
func (x *VersionedValue) GetVersion() string
func (*VersionedValue) ProtoMessage ¶
func (*VersionedValue) ProtoMessage()
func (*VersionedValue) ProtoReflect ¶
func (x *VersionedValue) ProtoReflect() protoreflect.Message
func (*VersionedValue) Reset ¶
func (x *VersionedValue) Reset()
func (*VersionedValue) String ¶
func (x *VersionedValue) String() string