Documentation ¶
Index ¶
- Variables
- func Connect(address string, port int) (*grpc.ClientConn, error)
- func InsecureConnect(address string, port int) (*grpc.ClientConn, error)
- func RegisterFileServiceServer(s grpc.ServiceRegistrar, srv FileServiceServer)
- func RegisterHealthCheckServiceServer(s grpc.ServiceRegistrar, srv HealthCheckServiceServer)
- type ChunckHandler
- func (*ChunckHandler) Descriptor() ([]byte, []int)deprecated
- func (x *ChunckHandler) GetChunkServiceAddress() string
- func (x *ChunckHandler) GetMethod() Method
- func (x *ChunckHandler) GetPermitted() bool
- func (*ChunckHandler) ProtoMessage()
- func (x *ChunckHandler) ProtoReflect() protoreflect.Message
- func (x *ChunckHandler) Reset()
- func (x *ChunckHandler) String() string
- type FileRequest
- func (*FileRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FileRequest) GetFileName() string
- func (x *FileRequest) GetIndex() int32
- func (*FileRequest) ProtoMessage()
- func (x *FileRequest) ProtoReflect() protoreflect.Message
- func (x *FileRequest) Reset()
- func (x *FileRequest) String() string
- type FileResponse
- func (*FileResponse) Descriptor() ([]byte, []int)deprecated
- func (x *FileResponse) GetFilename() string
- func (x *FileResponse) GetHandler() *ChunckHandler
- func (*FileResponse) ProtoMessage()
- func (x *FileResponse) ProtoReflect() protoreflect.Message
- func (x *FileResponse) Reset()
- func (x *FileResponse) String() string
- type FileServiceClient
- type FileServiceServer
- type FileService_GetChuncksClient
- type FileService_GetChuncksServer
- type HealthCheckServiceClient
- type HealthCheckServiceServer
- type Method
- type Ping
- type ServiceStatus
- func (*ServiceStatus) Descriptor() ([]byte, []int)deprecated
- func (x *ServiceStatus) GetDiskFree() uint64
- func (x *ServiceStatus) GetId() int32
- func (x *ServiceStatus) GetRecentChunkNum() int32
- func (x *ServiceStatus) GetStatus() int32
- func (*ServiceStatus) ProtoMessage()
- func (x *ServiceStatus) ProtoReflect() protoreflect.Message
- func (x *ServiceStatus) Reset()
- func (x *ServiceStatus) String() string
- type UnimplementedFileServiceServer
- type UnimplementedHealthCheckServiceServer
- type UnsafeFileServiceServer
- type UnsafeHealthCheckServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( Method_name = map[int32]string{ 0: "CREATE", 1: "DELELT", 3: "READ", 4: "WRITE", } Method_value = map[string]int32{ "CREATE": 0, "DELELT": 1, "READ": 3, "WRITE": 4, } )
Enum value maps for Method.
var FileService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "FileService", HandlerType: (*FileServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "GetChuncks", Handler: _FileService_GetChuncks_Handler, ClientStreams: true, }, }, Metadata: "files.proto", }
FileService_ServiceDesc is the grpc.ServiceDesc for FileService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_file_handler_proto protoreflect.FileDescriptor
var File_files_proto protoreflect.FileDescriptor
var File_health_check_proto protoreflect.FileDescriptor
var HealthCheckService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "HealthCheckService", HandlerType: (*HealthCheckServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CheckHealthStatus", Handler: _HealthCheckService_CheckHealthStatus_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "health_check.proto", }
HealthCheckService_ServiceDesc is the grpc.ServiceDesc for HealthCheckService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func InsecureConnect ¶
func InsecureConnect(address string, port int) (*grpc.ClientConn, error)
func RegisterFileServiceServer ¶
func RegisterFileServiceServer(s grpc.ServiceRegistrar, srv FileServiceServer)
func RegisterHealthCheckServiceServer ¶
func RegisterHealthCheckServiceServer(s grpc.ServiceRegistrar, srv HealthCheckServiceServer)
Types ¶
type ChunckHandler ¶
type ChunckHandler struct { ChunkServiceAddress string `protobuf:"bytes,1,opt,name=chunkServiceAddress,proto3" json:"chunkServiceAddress,omitempty"` Method Method `protobuf:"varint,2,opt,name=method,proto3,enum=Method" json:"method,omitempty"` Permitted bool `protobuf:"varint,3,opt,name=permitted,proto3" json:"permitted,omitempty"` // contains filtered or unexported fields }
func (*ChunckHandler) Descriptor
deprecated
func (*ChunckHandler) Descriptor() ([]byte, []int)
Deprecated: Use ChunckHandler.ProtoReflect.Descriptor instead.
func (*ChunckHandler) GetChunkServiceAddress ¶
func (x *ChunckHandler) GetChunkServiceAddress() string
func (*ChunckHandler) GetMethod ¶
func (x *ChunckHandler) GetMethod() Method
func (*ChunckHandler) GetPermitted ¶
func (x *ChunckHandler) GetPermitted() bool
func (*ChunckHandler) ProtoMessage ¶
func (*ChunckHandler) ProtoMessage()
func (*ChunckHandler) ProtoReflect ¶
func (x *ChunckHandler) ProtoReflect() protoreflect.Message
func (*ChunckHandler) Reset ¶
func (x *ChunckHandler) Reset()
func (*ChunckHandler) String ¶
func (x *ChunckHandler) String() string
type FileRequest ¶
type FileRequest struct { FileName string `protobuf:"bytes,1,opt,name=fileName,proto3" json:"fileName,omitempty"` Index int32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` // chunck index // contains filtered or unexported fields }
func (*FileRequest) Descriptor
deprecated
func (*FileRequest) Descriptor() ([]byte, []int)
Deprecated: Use FileRequest.ProtoReflect.Descriptor instead.
func (*FileRequest) GetFileName ¶
func (x *FileRequest) GetFileName() string
func (*FileRequest) GetIndex ¶
func (x *FileRequest) GetIndex() int32
func (*FileRequest) ProtoMessage ¶
func (*FileRequest) ProtoMessage()
func (*FileRequest) ProtoReflect ¶
func (x *FileRequest) ProtoReflect() protoreflect.Message
func (*FileRequest) Reset ¶
func (x *FileRequest) Reset()
func (*FileRequest) String ¶
func (x *FileRequest) String() string
type FileResponse ¶
type FileResponse struct { Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` Handler *ChunckHandler `protobuf:"bytes,2,opt,name=handler,proto3" json:"handler,omitempty"` // contains filtered or unexported fields }
func (*FileResponse) Descriptor
deprecated
func (*FileResponse) Descriptor() ([]byte, []int)
Deprecated: Use FileResponse.ProtoReflect.Descriptor instead.
func (*FileResponse) GetFilename ¶
func (x *FileResponse) GetFilename() string
func (*FileResponse) GetHandler ¶
func (x *FileResponse) GetHandler() *ChunckHandler
func (*FileResponse) ProtoMessage ¶
func (*FileResponse) ProtoMessage()
func (*FileResponse) ProtoReflect ¶
func (x *FileResponse) ProtoReflect() protoreflect.Message
func (*FileResponse) Reset ¶
func (x *FileResponse) Reset()
func (*FileResponse) String ¶
func (x *FileResponse) String() string
type FileServiceClient ¶
type FileServiceClient interface {
GetChuncks(ctx context.Context, opts ...grpc.CallOption) (FileService_GetChuncksClient, error)
}
FileServiceClient is the client API for FileService 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 NewFileServiceClient ¶
func NewFileServiceClient(cc grpc.ClientConnInterface) FileServiceClient
type FileServiceServer ¶
type FileServiceServer interface { GetChuncks(FileService_GetChuncksServer) error // contains filtered or unexported methods }
FileServiceServer is the server API for FileService service. All implementations must embed UnimplementedFileServiceServer for forward compatibility
type FileService_GetChuncksClient ¶
type FileService_GetChuncksClient interface { Send(*FileRequest) error CloseAndRecv() (*FileResponse, error) grpc.ClientStream }
type FileService_GetChuncksServer ¶
type FileService_GetChuncksServer interface { SendAndClose(*FileResponse) error Recv() (*FileRequest, error) grpc.ServerStream }
type HealthCheckServiceClient ¶
type HealthCheckServiceClient interface {
CheckHealthStatus(ctx context.Context, in *Ping, opts ...grpc.CallOption) (*ServiceStatus, error)
}
HealthCheckServiceClient is the client API for HealthCheckService 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 NewHealthCheckServiceClient ¶
func NewHealthCheckServiceClient(cc grpc.ClientConnInterface) HealthCheckServiceClient
type HealthCheckServiceServer ¶
type HealthCheckServiceServer interface { CheckHealthStatus(context.Context, *Ping) (*ServiceStatus, error) // contains filtered or unexported methods }
HealthCheckServiceServer is the server API for HealthCheckService service. All implementations must embed UnimplementedHealthCheckServiceServer for forward compatibility
type Method ¶
type Method int32
func (Method) Descriptor ¶
func (Method) Descriptor() protoreflect.EnumDescriptor
func (Method) EnumDescriptor
deprecated
func (Method) Number ¶
func (x Method) Number() protoreflect.EnumNumber
func (Method) Type ¶
func (Method) Type() protoreflect.EnumType
type Ping ¶
type Ping struct {
// contains filtered or unexported fields
}
func (*Ping) Descriptor
deprecated
func (*Ping) ProtoMessage ¶
func (*Ping) ProtoMessage()
func (*Ping) ProtoReflect ¶
func (x *Ping) ProtoReflect() protoreflect.Message
type ServiceStatus ¶
type ServiceStatus struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` DiskFree uint64 `protobuf:"varint,3,opt,name=diskFree,proto3" json:"diskFree,omitempty"` RecentChunkNum int32 `protobuf:"varint,4,opt,name=recentChunkNum,proto3" json:"recentChunkNum,omitempty"` // contains filtered or unexported fields }
func (*ServiceStatus) Descriptor
deprecated
func (*ServiceStatus) Descriptor() ([]byte, []int)
Deprecated: Use ServiceStatus.ProtoReflect.Descriptor instead.
func (*ServiceStatus) GetDiskFree ¶
func (x *ServiceStatus) GetDiskFree() uint64
func (*ServiceStatus) GetId ¶
func (x *ServiceStatus) GetId() int32
func (*ServiceStatus) GetRecentChunkNum ¶
func (x *ServiceStatus) GetRecentChunkNum() int32
func (*ServiceStatus) GetStatus ¶
func (x *ServiceStatus) GetStatus() int32
func (*ServiceStatus) ProtoMessage ¶
func (*ServiceStatus) ProtoMessage()
func (*ServiceStatus) ProtoReflect ¶
func (x *ServiceStatus) ProtoReflect() protoreflect.Message
func (*ServiceStatus) Reset ¶
func (x *ServiceStatus) Reset()
func (*ServiceStatus) String ¶
func (x *ServiceStatus) String() string
type UnimplementedFileServiceServer ¶
type UnimplementedFileServiceServer struct { }
UnimplementedFileServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedFileServiceServer) GetChuncks ¶
func (UnimplementedFileServiceServer) GetChuncks(FileService_GetChuncksServer) error
type UnimplementedHealthCheckServiceServer ¶
type UnimplementedHealthCheckServiceServer struct { }
UnimplementedHealthCheckServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedHealthCheckServiceServer) CheckHealthStatus ¶
func (UnimplementedHealthCheckServiceServer) CheckHealthStatus(context.Context, *Ping) (*ServiceStatus, error)
type UnsafeFileServiceServer ¶
type UnsafeFileServiceServer interface {
// contains filtered or unexported methods
}
UnsafeFileServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FileServiceServer will result in compilation errors.
type UnsafeHealthCheckServiceServer ¶
type UnsafeHealthCheckServiceServer interface {
// contains filtered or unexported methods
}
UnsafeHealthCheckServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HealthCheckServiceServer will result in compilation errors.