satellite: remove irreparabledb leftovers from code

Change-Id: Iabceea2733d6e0d3ddb26c235ef26ae132a44fc2
This commit is contained in:
Michał Niewrzał 2021-06-17 09:38:36 +02:00 committed by Michal Niewrzal
parent f16bb4d198
commit b582c974c3
4 changed files with 40 additions and 388 deletions

View File

@ -7,12 +7,10 @@ import (
"context"
"encoding/base64"
"encoding/csv"
"encoding/json"
"flag"
"fmt"
"os"
"strconv"
"strings"
"github.com/spf13/cobra"
"github.com/zeebo/errs"
@ -21,7 +19,6 @@ import (
"storj.io/common/rpc"
"storj.io/common/storj"
"storj.io/private/process"
"storj.io/storj/private/prompt"
_ "storj.io/storj/private/version" // This attaches version information during release builds.
"storj.io/storj/satellite/internalpb"
"storj.io/uplink/private/eestream"
@ -49,8 +46,6 @@ var (
// ErrArgs throws when there are errors with CLI args.
ErrArgs = errs.Class("invalid CLI args")
irreparableLimit int32
// Commander CLI.
rootCmd = &cobra.Command{
Use: "inspector",
@ -64,11 +59,6 @@ var (
Use: "health",
Short: "commands for querying health of a stored data",
}
irreparableCmd = &cobra.Command{
Use: "irreparable",
Short: "list segments in irreparable database",
RunE: getSegments,
}
objectHealthCmd = &cobra.Command{
Use: "object <project-id> <bucket> <encrypted-path>",
Short: "Get stats about an object's health",
@ -87,7 +77,6 @@ var (
type Inspector struct {
conn *rpc.Conn
identity *identity.FullIdentity
irrdbclient internalpb.DRPCIrreparableInspectorClient
healthclient internalpb.DRPCHealthInspectorClient
}
@ -109,7 +98,6 @@ func NewInspector(ctx context.Context, address, path string) (*Inspector, error)
return &Inspector{
conn: conn,
identity: id,
irrdbclient: internalpb.NewDRPCIrreparableInspectorClient(conn),
healthclient: internalpb.NewDRPCHealthInspectorClient(conn),
}, nil
}
@ -362,76 +350,8 @@ func printRedundancyTable(w *csv.Writer, redundancy eestream.RedundancyStrategy)
return nil
}
func getSegments(cmd *cobra.Command, args []string) error {
if irreparableLimit <= int32(0) {
return ErrArgs.New("limit must be greater than 0")
}
ctx, _ := process.Ctx(cmd)
i, err := NewInspector(ctx, *Addr, *IdentityPath)
if err != nil {
return ErrInspectorDial.Wrap(err)
}
defer func() { err = errs.Combine(err, i.Close()) }()
var lastSeenSegmentPath = []byte{}
// query DB and paginate results
for {
req := &internalpb.ListIrreparableSegmentsRequest{
Limit: irreparableLimit,
LastSeenSegmentPath: lastSeenSegmentPath,
}
res, err := i.irrdbclient.ListIrreparableSegments(ctx, req)
if err != nil {
return ErrRequest.Wrap(err)
}
if len(res.Segments) == 0 {
break
}
lastSeenSegmentPath = res.Segments[len(res.Segments)-1].Path
objects := sortSegments(res.Segments)
// format and print segments
enc := json.NewEncoder(os.Stdout)
enc.SetIndent("", " ")
err = enc.Encode(objects)
if err != nil {
return err
}
length := int32(len(res.Segments))
if length >= irreparableLimit {
confirmed, err := prompt.Confirm("\nNext page? [y/n]")
if err != nil {
return err
}
if !confirmed {
break
}
}
}
return nil
}
// sortSegments by the object they belong to.
func sortSegments(segments []*internalpb.IrreparableSegment) map[string][]*internalpb.IrreparableSegment {
objects := make(map[string][]*internalpb.IrreparableSegment)
for _, seg := range segments {
pathElements := storj.SplitPath(string(seg.Path))
// by removing the segment index, we can easily sort segments into a map of objects
pathElements = append(pathElements[:1], pathElements[2:]...)
objPath := strings.Join(pathElements, "/")
objects[objPath] = append(objects[objPath], seg)
}
return objects
}
func init() {
rootCmd.AddCommand(statsCmd)
rootCmd.AddCommand(irreparableCmd)
rootCmd.AddCommand(healthCmd)
healthCmd.AddCommand(objectHealthCmd)
@ -439,8 +359,6 @@ func init() {
objectHealthCmd.Flags().StringVar(&CSVPath, "csv-path", "stdout", "csv path where command output is written")
irreparableCmd.Flags().Int32Var(&irreparableLimit, "limit", 50, "max number of results per page")
flag.Parse()
}

View File

@ -23,160 +23,6 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type ListIrreparableSegmentsRequest struct {
Limit int32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
LastSeenSegmentPath []byte `protobuf:"bytes,2,opt,name=last_seen_segment_path,json=lastSeenSegmentPath,proto3" json:"last_seen_segment_path,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListIrreparableSegmentsRequest) Reset() { *m = ListIrreparableSegmentsRequest{} }
func (m *ListIrreparableSegmentsRequest) String() string { return proto.CompactTextString(m) }
func (*ListIrreparableSegmentsRequest) ProtoMessage() {}
func (*ListIrreparableSegmentsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_a07d9034b2dd9d26, []int{0}
}
func (m *ListIrreparableSegmentsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListIrreparableSegmentsRequest.Unmarshal(m, b)
}
func (m *ListIrreparableSegmentsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListIrreparableSegmentsRequest.Marshal(b, m, deterministic)
}
func (m *ListIrreparableSegmentsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListIrreparableSegmentsRequest.Merge(m, src)
}
func (m *ListIrreparableSegmentsRequest) XXX_Size() int {
return xxx_messageInfo_ListIrreparableSegmentsRequest.Size(m)
}
func (m *ListIrreparableSegmentsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListIrreparableSegmentsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListIrreparableSegmentsRequest proto.InternalMessageInfo
func (m *ListIrreparableSegmentsRequest) GetLimit() int32 {
if m != nil {
return m.Limit
}
return 0
}
func (m *ListIrreparableSegmentsRequest) GetLastSeenSegmentPath() []byte {
if m != nil {
return m.LastSeenSegmentPath
}
return nil
}
type ListIrreparableSegmentsResponse struct {
Segments []*IrreparableSegment `protobuf:"bytes,1,rep,name=segments,proto3" json:"segments,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListIrreparableSegmentsResponse) Reset() { *m = ListIrreparableSegmentsResponse{} }
func (m *ListIrreparableSegmentsResponse) String() string { return proto.CompactTextString(m) }
func (*ListIrreparableSegmentsResponse) ProtoMessage() {}
func (*ListIrreparableSegmentsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_a07d9034b2dd9d26, []int{1}
}
func (m *ListIrreparableSegmentsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListIrreparableSegmentsResponse.Unmarshal(m, b)
}
func (m *ListIrreparableSegmentsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListIrreparableSegmentsResponse.Marshal(b, m, deterministic)
}
func (m *ListIrreparableSegmentsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListIrreparableSegmentsResponse.Merge(m, src)
}
func (m *ListIrreparableSegmentsResponse) XXX_Size() int {
return xxx_messageInfo_ListIrreparableSegmentsResponse.Size(m)
}
func (m *ListIrreparableSegmentsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListIrreparableSegmentsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListIrreparableSegmentsResponse proto.InternalMessageInfo
func (m *ListIrreparableSegmentsResponse) GetSegments() []*IrreparableSegment {
if m != nil {
return m.Segments
}
return nil
}
type IrreparableSegment struct {
Path []byte `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
SegmentDetail *pb.Pointer `protobuf:"bytes,2,opt,name=segment_detail,json=segmentDetail,proto3" json:"segment_detail,omitempty"`
LostPieces int32 `protobuf:"varint,3,opt,name=lost_pieces,json=lostPieces,proto3" json:"lost_pieces,omitempty"`
LastRepairAttempt int64 `protobuf:"varint,4,opt,name=last_repair_attempt,json=lastRepairAttempt,proto3" json:"last_repair_attempt,omitempty"`
RepairAttemptCount int64 `protobuf:"varint,5,opt,name=repair_attempt_count,json=repairAttemptCount,proto3" json:"repair_attempt_count,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *IrreparableSegment) Reset() { *m = IrreparableSegment{} }
func (m *IrreparableSegment) String() string { return proto.CompactTextString(m) }
func (*IrreparableSegment) ProtoMessage() {}
func (*IrreparableSegment) Descriptor() ([]byte, []int) {
return fileDescriptor_a07d9034b2dd9d26, []int{2}
}
func (m *IrreparableSegment) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IrreparableSegment.Unmarshal(m, b)
}
func (m *IrreparableSegment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_IrreparableSegment.Marshal(b, m, deterministic)
}
func (m *IrreparableSegment) XXX_Merge(src proto.Message) {
xxx_messageInfo_IrreparableSegment.Merge(m, src)
}
func (m *IrreparableSegment) XXX_Size() int {
return xxx_messageInfo_IrreparableSegment.Size(m)
}
func (m *IrreparableSegment) XXX_DiscardUnknown() {
xxx_messageInfo_IrreparableSegment.DiscardUnknown(m)
}
var xxx_messageInfo_IrreparableSegment proto.InternalMessageInfo
func (m *IrreparableSegment) GetPath() []byte {
if m != nil {
return m.Path
}
return nil
}
func (m *IrreparableSegment) GetSegmentDetail() *pb.Pointer {
if m != nil {
return m.SegmentDetail
}
return nil
}
func (m *IrreparableSegment) GetLostPieces() int32 {
if m != nil {
return m.LostPieces
}
return 0
}
func (m *IrreparableSegment) GetLastRepairAttempt() int64 {
if m != nil {
return m.LastRepairAttempt
}
return 0
}
func (m *IrreparableSegment) GetRepairAttemptCount() int64 {
if m != nil {
return m.RepairAttemptCount
}
return 0
}
type ObjectHealthRequest struct {
EncryptedPath []byte `protobuf:"bytes,1,opt,name=encrypted_path,json=encryptedPath,proto3" json:"encrypted_path,omitempty"`
Bucket []byte `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"`
@ -193,7 +39,7 @@ func (m *ObjectHealthRequest) Reset() { *m = ObjectHealthRequest{} }
func (m *ObjectHealthRequest) String() string { return proto.CompactTextString(m) }
func (*ObjectHealthRequest) ProtoMessage() {}
func (*ObjectHealthRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_a07d9034b2dd9d26, []int{3}
return fileDescriptor_a07d9034b2dd9d26, []int{0}
}
func (m *ObjectHealthRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ObjectHealthRequest.Unmarshal(m, b)
@ -267,7 +113,7 @@ func (m *ObjectHealthResponse) Reset() { *m = ObjectHealthResponse{} }
func (m *ObjectHealthResponse) String() string { return proto.CompactTextString(m) }
func (*ObjectHealthResponse) ProtoMessage() {}
func (*ObjectHealthResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_a07d9034b2dd9d26, []int{4}
return fileDescriptor_a07d9034b2dd9d26, []int{1}
}
func (m *ObjectHealthResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ObjectHealthResponse.Unmarshal(m, b)
@ -315,7 +161,7 @@ func (m *SegmentHealthRequest) Reset() { *m = SegmentHealthRequest{} }
func (m *SegmentHealthRequest) String() string { return proto.CompactTextString(m) }
func (*SegmentHealthRequest) ProtoMessage() {}
func (*SegmentHealthRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_a07d9034b2dd9d26, []int{5}
return fileDescriptor_a07d9034b2dd9d26, []int{2}
}
func (m *SegmentHealthRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SegmentHealthRequest.Unmarshal(m, b)
@ -375,7 +221,7 @@ func (m *SegmentHealthResponse) Reset() { *m = SegmentHealthResponse{} }
func (m *SegmentHealthResponse) String() string { return proto.CompactTextString(m) }
func (*SegmentHealthResponse) ProtoMessage() {}
func (*SegmentHealthResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_a07d9034b2dd9d26, []int{6}
return fileDescriptor_a07d9034b2dd9d26, []int{3}
}
func (m *SegmentHealthResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SegmentHealthResponse.Unmarshal(m, b)
@ -423,7 +269,7 @@ func (m *SegmentHealth) Reset() { *m = SegmentHealth{} }
func (m *SegmentHealth) String() string { return proto.CompactTextString(m) }
func (*SegmentHealth) ProtoMessage() {}
func (*SegmentHealth) Descriptor() ([]byte, []int) {
return fileDescriptor_a07d9034b2dd9d26, []int{7}
return fileDescriptor_a07d9034b2dd9d26, []int{4}
}
func (m *SegmentHealth) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SegmentHealth.Unmarshal(m, b)
@ -451,9 +297,6 @@ func (m *SegmentHealth) GetSegment() []byte {
}
func init() {
proto.RegisterType((*ListIrreparableSegmentsRequest)(nil), "satellite.inspector.ListIrreparableSegmentsRequest")
proto.RegisterType((*ListIrreparableSegmentsResponse)(nil), "satellite.inspector.ListIrreparableSegmentsResponse")
proto.RegisterType((*IrreparableSegment)(nil), "satellite.inspector.IrreparableSegment")
proto.RegisterType((*ObjectHealthRequest)(nil), "satellite.inspector.ObjectHealthRequest")
proto.RegisterType((*ObjectHealthResponse)(nil), "satellite.inspector.ObjectHealthResponse")
proto.RegisterType((*SegmentHealthRequest)(nil), "satellite.inspector.SegmentHealthRequest")
@ -464,51 +307,39 @@ func init() {
func init() { proto.RegisterFile("inspector.proto", fileDescriptor_a07d9034b2dd9d26) }
var fileDescriptor_a07d9034b2dd9d26 = []byte{
// 726 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcd, 0x6e, 0xd3, 0x40,
0x10, 0x66, 0x9b, 0x36, 0xc0, 0x24, 0x69, 0x61, 0x1b, 0x4a, 0x14, 0x04, 0x8d, 0x5c, 0x55, 0xa4,
0x14, 0x25, 0x28, 0xe5, 0x02, 0x48, 0x48, 0xfd, 0x39, 0x10, 0x09, 0x41, 0xe5, 0xde, 0xb8, 0x58,
0xfe, 0x99, 0x34, 0x6e, 0x9d, 0x5d, 0xb3, 0xbb, 0x91, 0xe8, 0x9d, 0x07, 0x40, 0xe2, 0xc4, 0x81,
0xb7, 0xe0, 0x69, 0x38, 0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x81, 0xbb, 0x57, 0x3c, 0x68, 0x74, 0x6f, 0xae, 0xa8, 0x7f, 0x7f, 0x6b, 0x9b, 0x4f, 0xff,
0x2d, 0x29, 0xf5, 0xb3, 0xf7, 0x93, 0xc0, 0x5a, 0xaa, 0xe7, 0x65, 0x6b, 0x08, 0xd5, 0xe2, 0xcf,
0x85, 0xb6, 0xe7, 0x56, 0x9e, 0xf3, 0x76, 0x34, 0x77, 0x16, 0x60, 0xa6, 0x17, 0x5b, 0xd7, 0xe8,
0x70, 0xda, 0xd0, 0x9d, 0x05, 0x76, 0xc9, 0x5c, 0xf4, 0x68, 0x11, 0x6a, 0x76, 0xd3, 0xc1, 0xf6,
0xbb, 0x2d, 0xa9, 0xb8, 0x38, 0xeb, 0x84, 0xbc, 0xab, 0x0f, 0xdd, 0x3c, 0xbb, 0xab, 0x97, 0x8f,
0xb9, 0x51, 0xec, 0x79, 0x65, 0xfd, 0xb7, 0xb6, 0xf7, 0x27, 0x00, 0x00, 0xff, 0xff, 0xbc, 0x69,
0x35, 0x2a, 0x27, 0x07, 0x00, 0x00,
// 529 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4d, 0x8f, 0xd3, 0x30,
0x10, 0xc5, 0xdb, 0x6d, 0x81, 0x69, 0x4a, 0xc1, 0x2d, 0x28, 0x2a, 0x42, 0x54, 0x59, 0xad, 0xd4,
0x65, 0x51, 0x2a, 0x95, 0x1b, 0x48, 0x48, 0x54, 0x1c, 0xe8, 0x05, 0x50, 0xf6, 0xc6, 0x25, 0x4a,
0xe2, 0x69, 0x93, 0x25, 0xb5, 0x83, 0xed, 0x4a, 0xf4, 0x5f, 0x20, 0x71, 0xe2, 0x7f, 0xf0, 0x6b,
0x38, 0x70, 0xe0, 0xc2, 0xdf, 0x40, 0x75, 0xdc, 0x6c, 0xbf, 0x0e, 0x95, 0xb8, 0x79, 0xe6, 0xbd,
0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xfb, 0x4e, 0xd6, 0xee, 0x50, 0x04, 0x67, 0xf3, 0x39, 0xd2, 0xc1, 0x41, 0x0f, 0x0f,
0xfc, 0x37, 0x7b, 0x17, 0x47, 0x30, 0xcb, 0xa0, 0xbc, 0x5b, 0x34, 0xdd, 0x35, 0xec, 0xe2, 0x88,
0xac, 0xec, 0x45, 0xcf, 0x8e, 0xa1, 0xae, 0x6f, 0x1a, 0x9f, 0x7f, 0x3a, 0x53, 0x5a, 0xc8, 0x6b,
0x3f, 0x13, 0x43, 0x73, 0x18, 0x56, 0xd3, 0x43, 0x13, 0x2e, 0x8f, 0xf2, 0x22, 0x8e, 0x1b, 0xe6,
0xc3, 0xf3, 0xe2, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7d, 0x7e, 0x66, 0x26, 0xc9, 0x04, 0x00,
0x00,
}

View File

@ -10,28 +10,6 @@ import "pointerdb.proto";
package satellite.inspector;
service IrreparableInspector {
// ListIrreparableSegments returns damaged segments
rpc ListIrreparableSegments(ListIrreparableSegmentsRequest) returns (ListIrreparableSegmentsResponse);
}
message ListIrreparableSegmentsRequest {
int32 limit = 1;
bytes last_seen_segment_path = 2;
}
message ListIrreparableSegmentsResponse {
repeated IrreparableSegment segments = 1;
}
message IrreparableSegment {
bytes path = 1;
pointerdb.Pointer segment_detail = 2;
int32 lost_pieces = 3;
int64 last_repair_attempt = 4;
int64 repair_attempt_count = 5;
}
service HealthInspector {
// ObjectHealth will return stats about the health of an object
rpc ObjectHealth(ObjectHealthRequest) returns (ObjectHealthResponse) {}

View File

@ -39,81 +39,6 @@ func (drpcEncoding_File_inspector_proto) JSONUnmarshal(buf []byte, msg drpc.Mess
return jsonpb.Unmarshal(bytes.NewReader(buf), msg.(proto.Message))
}
type DRPCIrreparableInspectorClient interface {
DRPCConn() drpc.Conn
ListIrreparableSegments(ctx context.Context, in *ListIrreparableSegmentsRequest) (*ListIrreparableSegmentsResponse, error)
}
type drpcIrreparableInspectorClient struct {
cc drpc.Conn
}
func NewDRPCIrreparableInspectorClient(cc drpc.Conn) DRPCIrreparableInspectorClient {
return &drpcIrreparableInspectorClient{cc}
}
func (c *drpcIrreparableInspectorClient) DRPCConn() drpc.Conn { return c.cc }
func (c *drpcIrreparableInspectorClient) ListIrreparableSegments(ctx context.Context, in *ListIrreparableSegmentsRequest) (*ListIrreparableSegmentsResponse, error) {
out := new(ListIrreparableSegmentsResponse)
err := c.cc.Invoke(ctx, "/satellite.inspector.IrreparableInspector/ListIrreparableSegments", drpcEncoding_File_inspector_proto{}, in, out)
if err != nil {
return nil, err
}
return out, nil
}
type DRPCIrreparableInspectorServer interface {
ListIrreparableSegments(context.Context, *ListIrreparableSegmentsRequest) (*ListIrreparableSegmentsResponse, error)
}
type DRPCIrreparableInspectorUnimplementedServer struct{}
func (s *DRPCIrreparableInspectorUnimplementedServer) ListIrreparableSegments(context.Context, *ListIrreparableSegmentsRequest) (*ListIrreparableSegmentsResponse, error) {
return nil, drpcerr.WithCode(errors.New("Unimplemented"), 12)
}
type DRPCIrreparableInspectorDescription struct{}
func (DRPCIrreparableInspectorDescription) NumMethods() int { return 1 }
func (DRPCIrreparableInspectorDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) {
switch n {
case 0:
return "/satellite.inspector.IrreparableInspector/ListIrreparableSegments", drpcEncoding_File_inspector_proto{},
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
return srv.(DRPCIrreparableInspectorServer).
ListIrreparableSegments(
ctx,
in1.(*ListIrreparableSegmentsRequest),
)
}, DRPCIrreparableInspectorServer.ListIrreparableSegments, true
default:
return "", nil, nil, nil, false
}
}
func DRPCRegisterIrreparableInspector(mux drpc.Mux, impl DRPCIrreparableInspectorServer) error {
return mux.Register(impl, DRPCIrreparableInspectorDescription{})
}
type DRPCIrreparableInspector_ListIrreparableSegmentsStream interface {
drpc.Stream
SendAndClose(*ListIrreparableSegmentsResponse) error
}
type drpcIrreparableInspector_ListIrreparableSegmentsStream struct {
drpc.Stream
}
func (x *drpcIrreparableInspector_ListIrreparableSegmentsStream) SendAndClose(m *ListIrreparableSegmentsResponse) error {
if err := x.MsgSend(m, drpcEncoding_File_inspector_proto{}); err != nil {
return err
}
return x.CloseSend()
}
type DRPCHealthInspectorClient interface {
DRPCConn() drpc.Conn