Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterVolumeServiceServer(s grpc.ServiceRegistrar, srv VolumeServiceServer)
- type ChunkData
- type ChunkID
- type UnimplementedVolumeServiceServer
- type UnsafeVolumeServiceServer
- type VolumeServiceClient
- type VolumeServiceServer
- type VolumeService_GetChunkClient
- type VolumeService_GetChunkServer
- type VolumeService_PutChunkClient
- type VolumeService_PutChunkServer
Constants ¶
const ( VolumeService_PutChunk_FullMethodName = "/volume_pb.VolumeService/PutChunk" VolumeService_GetChunk_FullMethodName = "/volume_pb.VolumeService/GetChunk" VolumeService_DeleteChunk_FullMethodName = "/volume_pb.VolumeService/DeleteChunk" )
Variables ¶
var File_volume_proto protoreflect.FileDescriptor
var VolumeService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "volume_pb.VolumeService", HandlerType: (*VolumeServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "DeleteChunk", Handler: _VolumeService_DeleteChunk_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "PutChunk", Handler: _VolumeService_PutChunk_Handler, ClientStreams: true, }, { StreamName: "GetChunk", Handler: _VolumeService_GetChunk_Handler, ServerStreams: true, }, }, Metadata: "volume.proto", }
VolumeService_ServiceDesc is the grpc.ServiceDesc for VolumeService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterVolumeServiceServer ¶
func RegisterVolumeServiceServer(s grpc.ServiceRegistrar, srv VolumeServiceServer)
Types ¶
type ChunkData ¶
type ChunkData struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*ChunkData) Descriptor
deprecated
func (*ChunkData) ProtoMessage ¶
func (*ChunkData) ProtoMessage()
func (*ChunkData) ProtoReflect ¶
func (x *ChunkData) ProtoReflect() protoreflect.Message
type ChunkID ¶
type ChunkID struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*ChunkID) Descriptor
deprecated
func (*ChunkID) ProtoMessage ¶
func (*ChunkID) ProtoMessage()
func (*ChunkID) ProtoReflect ¶
func (x *ChunkID) ProtoReflect() protoreflect.Message
type UnimplementedVolumeServiceServer ¶
type UnimplementedVolumeServiceServer struct { }
UnimplementedVolumeServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedVolumeServiceServer) DeleteChunk ¶
func (UnimplementedVolumeServiceServer) GetChunk ¶
func (UnimplementedVolumeServiceServer) GetChunk(*ChunkID, VolumeService_GetChunkServer) error
func (UnimplementedVolumeServiceServer) PutChunk ¶
func (UnimplementedVolumeServiceServer) PutChunk(VolumeService_PutChunkServer) error
type UnsafeVolumeServiceServer ¶
type UnsafeVolumeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeVolumeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to VolumeServiceServer will result in compilation errors.
type VolumeServiceClient ¶
type VolumeServiceClient interface { PutChunk(ctx context.Context, opts ...grpc.CallOption) (VolumeService_PutChunkClient, error) GetChunk(ctx context.Context, in *ChunkID, opts ...grpc.CallOption) (VolumeService_GetChunkClient, error) DeleteChunk(ctx context.Context, in *ChunkID, opts ...grpc.CallOption) (*emptypb.Empty, error) }
VolumeServiceClient is the client API for VolumeService 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 NewVolumeServiceClient ¶
func NewVolumeServiceClient(cc grpc.ClientConnInterface) VolumeServiceClient
type VolumeServiceServer ¶
type VolumeServiceServer interface { PutChunk(VolumeService_PutChunkServer) error GetChunk(*ChunkID, VolumeService_GetChunkServer) error DeleteChunk(context.Context, *ChunkID) (*emptypb.Empty, error) // contains filtered or unexported methods }
VolumeServiceServer is the server API for VolumeService service. All implementations must embed UnimplementedVolumeServiceServer for forward compatibility
type VolumeService_GetChunkClient ¶
type VolumeService_GetChunkClient interface { Recv() (*ChunkData, error) grpc.ClientStream }
type VolumeService_GetChunkServer ¶
type VolumeService_GetChunkServer interface { Send(*ChunkData) error grpc.ServerStream }