From 82b95c2a4eb143c72a2f8f69a6612f74b01fd81e Mon Sep 17 00:00:00 2001 From: Tim Serong Date: Wed, 27 Mar 2024 16:27:29 +1100 Subject: [PATCH 1/3] vendor: Update longhorn/backing-image-manager to get VirtualSize Signed-off-by: Tim Serong (cherry picked from commit ffe9a8375b6f485bfb2a8a9aa4f9dc5fa84e2c70) Signed-off-by: Shuo Wu --- go.mod | 2 +- go.sum | 4 +- .../backing-image-manager/api/types.go | 3 + .../backing-image-manager/pkg/rpc/rpc.pb.go | 1443 +++++++++++------ .../backing-image-manager/pkg/rpc/rpc.proto | 3 +- .../backing-image-manager/pkg/util/util.go | 79 +- vendor/modules.txt | 2 +- 7 files changed, 995 insertions(+), 541 deletions(-) diff --git a/go.mod b/go.mod index 38f47a3465..e747939d09 100644 --- a/go.mod +++ b/go.mod @@ -44,7 +44,7 @@ require ( github.com/gorilla/websocket v1.5.1 github.com/jinzhu/copier v0.3.5 github.com/kubernetes-csi/csi-lib-utils v0.6.1 - github.com/longhorn/backing-image-manager v1.5.4 + github.com/longhorn/backing-image-manager v1.5.5-rc1 github.com/longhorn/backupstore v0.0.0-20240219094812-3a87ee02df77 github.com/longhorn/go-common-libs v0.0.0-20240319112414-b75404dc7fbc github.com/longhorn/go-iscsi-helper v0.0.0-20240308033847-bc3aab599425 diff --git a/go.sum b/go.sum index 3c909d1a98..f55ed182a2 100644 --- a/go.sum +++ b/go.sum @@ -1034,8 +1034,8 @@ github.com/kubernetes-csi/csi-lib-utils v0.6.1 h1:+AZ58SRSRWh2vmMoWAAGcv7x6fIyBM github.com/kubernetes-csi/csi-lib-utils v0.6.1/go.mod h1:GVmlUmxZ+SUjVLXicRFjqWUUvWez0g0Y78zNV9t7KfQ= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= -github.com/longhorn/backing-image-manager v1.5.4 h1:z5eQ3r39q3VyuCSNtX2S++2tPaorsnOopKf3cjjvNzE= -github.com/longhorn/backing-image-manager v1.5.4/go.mod h1:M28iC1bpVgefAt8E72ozeE9aSwxXcoXmmIClj5zC7bo= +github.com/longhorn/backing-image-manager v1.5.5-rc1 h1:BmvqdMaoeKWien0p+3NGWM4DMnWhpm+ZQ68TKDrvdn8= +github.com/longhorn/backing-image-manager v1.5.5-rc1/go.mod h1:bus07p3/FRW45athdhF8y6ajbw3xl3SW7O0xTWVaXrw= github.com/longhorn/backupstore v0.0.0-20240219094812-3a87ee02df77 h1:iJRq59kA22f9HIjFtY/lz5rKCorZJrrYXju70XoWdmE= github.com/longhorn/backupstore v0.0.0-20240219094812-3a87ee02df77/go.mod h1:4cbJWtlrD2cGTQxQLtdlPTYopiJiusXH7CpOBrn/s3k= github.com/longhorn/go-common-libs v0.0.0-20240319112414-b75404dc7fbc h1:Eh9Npc5yBcVD8E4zVQIGUtC62HcfqevrHjQ2kh7fJ/E= diff --git a/vendor/github.com/longhorn/backing-image-manager/api/types.go b/vendor/github.com/longhorn/backing-image-manager/api/types.go index 8ae1759eb8..95fd779d9f 100644 --- a/vendor/github.com/longhorn/backing-image-manager/api/types.go +++ b/vendor/github.com/longhorn/backing-image-manager/api/types.go @@ -13,6 +13,7 @@ type BackingImage struct { Name string `json:"name"` UUID string `json:"uuid"` Size int64 `json:"size"` + VirtualSize int64 `json:"virtualSize"` ExpectedChecksum string `json:"expectedChecksum"` Status BackingImageStatus `json:"status"` @@ -32,6 +33,7 @@ func RPCToBackingImage(obj *rpc.BackingImageResponse) *BackingImage { Name: obj.Spec.Name, UUID: obj.Spec.Uuid, Size: obj.Spec.Size, + VirtualSize: obj.Spec.VirtualSize, ExpectedChecksum: obj.Spec.Checksum, Status: BackingImageStatus{ @@ -96,6 +98,7 @@ type FileInfo struct { FilePath string `json:"filePath"` UUID string `json:"uuid"` Size int64 `json:"size"` + VirtualSize int64 `json:"virtualSize"` State string `json:"state"` Progress int `json:"progress"` ProcessedSize int64 `json:"processedSize"` diff --git a/vendor/github.com/longhorn/backing-image-manager/pkg/rpc/rpc.pb.go b/vendor/github.com/longhorn/backing-image-manager/pkg/rpc/rpc.pb.go index 89b0e20271..5c09df9068 100644 --- a/vendor/github.com/longhorn/backing-image-manager/pkg/rpc/rpc.pb.go +++ b/vendor/github.com/longhorn/backing-image-manager/pkg/rpc/rpc.pb.go @@ -1,752 +1,1191 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v4.25.1 // source: github.com/longhorn/backing-image-manager/pkg/rpc/rpc.proto package rpc import ( context "context" - fmt "fmt" - proto "github.com/golang/protobuf/proto" empty "github.com/golang/protobuf/ptypes/empty" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type BackingImageSpec struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"` - Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` - Checksum string `protobuf:"bytes,4,opt,name=checksum,proto3" json:"checksum,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BackingImageSpec) Reset() { *m = BackingImageSpec{} } -func (m *BackingImageSpec) String() string { return proto.CompactTextString(m) } -func (*BackingImageSpec) ProtoMessage() {} -func (*BackingImageSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_cdf73a3350f27fd7, []int{0} -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *BackingImageSpec) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BackingImageSpec.Unmarshal(m, b) -} -func (m *BackingImageSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BackingImageSpec.Marshal(b, m, deterministic) + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"` + Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` + Checksum string `protobuf:"bytes,4,opt,name=checksum,proto3" json:"checksum,omitempty"` + VirtualSize int64 `protobuf:"varint,5,opt,name=virtualSize,proto3" json:"virtualSize,omitempty"` } -func (m *BackingImageSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_BackingImageSpec.Merge(m, src) + +func (x *BackingImageSpec) Reset() { + *x = BackingImageSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *BackingImageSpec) XXX_Size() int { - return xxx_messageInfo_BackingImageSpec.Size(m) + +func (x *BackingImageSpec) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BackingImageSpec) XXX_DiscardUnknown() { - xxx_messageInfo_BackingImageSpec.DiscardUnknown(m) + +func (*BackingImageSpec) ProtoMessage() {} + +func (x *BackingImageSpec) ProtoReflect() protoreflect.Message { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_BackingImageSpec proto.InternalMessageInfo +// Deprecated: Use BackingImageSpec.ProtoReflect.Descriptor instead. +func (*BackingImageSpec) Descriptor() ([]byte, []int) { + return file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescGZIP(), []int{0} +} -func (m *BackingImageSpec) GetName() string { - if m != nil { - return m.Name +func (x *BackingImageSpec) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *BackingImageSpec) GetUuid() string { - if m != nil { - return m.Uuid +func (x *BackingImageSpec) GetUuid() string { + if x != nil { + return x.Uuid } return "" } -func (m *BackingImageSpec) GetSize() int64 { - if m != nil { - return m.Size +func (x *BackingImageSpec) GetSize() int64 { + if x != nil { + return x.Size } return 0 } -func (m *BackingImageSpec) GetChecksum() string { - if m != nil { - return m.Checksum +func (x *BackingImageSpec) GetChecksum() string { + if x != nil { + return x.Checksum } return "" } -type BackingImageStatus struct { - State string `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` - ErrorMsg string `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"` - SendingReference int32 `protobuf:"varint,3,opt,name=sending_reference,json=sendingReference,proto3" json:"sending_reference,omitempty"` - SenderManagerAddress string `protobuf:"bytes,4,opt,name=sender_manager_address,json=senderManagerAddress,proto3" json:"sender_manager_address,omitempty"` - Progress int32 `protobuf:"varint,5,opt,name=progress,proto3" json:"progress,omitempty"` - Checksum string `protobuf:"bytes,6,opt,name=checksum,proto3" json:"checksum,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BackingImageStatus) Reset() { *m = BackingImageStatus{} } -func (m *BackingImageStatus) String() string { return proto.CompactTextString(m) } -func (*BackingImageStatus) ProtoMessage() {} -func (*BackingImageStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_cdf73a3350f27fd7, []int{1} +func (x *BackingImageSpec) GetVirtualSize() int64 { + if x != nil { + return x.VirtualSize + } + return 0 } -func (m *BackingImageStatus) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BackingImageStatus.Unmarshal(m, b) -} -func (m *BackingImageStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BackingImageStatus.Marshal(b, m, deterministic) +type BackingImageStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + State string `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` + ErrorMsg string `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"` + SendingReference int32 `protobuf:"varint,3,opt,name=sending_reference,json=sendingReference,proto3" json:"sending_reference,omitempty"` + SenderManagerAddress string `protobuf:"bytes,4,opt,name=sender_manager_address,json=senderManagerAddress,proto3" json:"sender_manager_address,omitempty"` + Progress int32 `protobuf:"varint,5,opt,name=progress,proto3" json:"progress,omitempty"` + Checksum string `protobuf:"bytes,6,opt,name=checksum,proto3" json:"checksum,omitempty"` } -func (m *BackingImageStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_BackingImageStatus.Merge(m, src) + +func (x *BackingImageStatus) Reset() { + *x = BackingImageStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *BackingImageStatus) XXX_Size() int { - return xxx_messageInfo_BackingImageStatus.Size(m) + +func (x *BackingImageStatus) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BackingImageStatus) XXX_DiscardUnknown() { - xxx_messageInfo_BackingImageStatus.DiscardUnknown(m) + +func (*BackingImageStatus) ProtoMessage() {} + +func (x *BackingImageStatus) ProtoReflect() protoreflect.Message { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_BackingImageStatus proto.InternalMessageInfo +// Deprecated: Use BackingImageStatus.ProtoReflect.Descriptor instead. +func (*BackingImageStatus) Descriptor() ([]byte, []int) { + return file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescGZIP(), []int{1} +} -func (m *BackingImageStatus) GetState() string { - if m != nil { - return m.State +func (x *BackingImageStatus) GetState() string { + if x != nil { + return x.State } return "" } -func (m *BackingImageStatus) GetErrorMsg() string { - if m != nil { - return m.ErrorMsg +func (x *BackingImageStatus) GetErrorMsg() string { + if x != nil { + return x.ErrorMsg } return "" } -func (m *BackingImageStatus) GetSendingReference() int32 { - if m != nil { - return m.SendingReference +func (x *BackingImageStatus) GetSendingReference() int32 { + if x != nil { + return x.SendingReference } return 0 } -func (m *BackingImageStatus) GetSenderManagerAddress() string { - if m != nil { - return m.SenderManagerAddress +func (x *BackingImageStatus) GetSenderManagerAddress() string { + if x != nil { + return x.SenderManagerAddress } return "" } -func (m *BackingImageStatus) GetProgress() int32 { - if m != nil { - return m.Progress +func (x *BackingImageStatus) GetProgress() int32 { + if x != nil { + return x.Progress } return 0 } -func (m *BackingImageStatus) GetChecksum() string { - if m != nil { - return m.Checksum +func (x *BackingImageStatus) GetChecksum() string { + if x != nil { + return x.Checksum } return "" } type BackingImageResponse struct { - Spec *BackingImageSpec `protobuf:"bytes,1,opt,name=spec,proto3" json:"spec,omitempty"` - Status *BackingImageStatus `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *BackingImageResponse) Reset() { *m = BackingImageResponse{} } -func (m *BackingImageResponse) String() string { return proto.CompactTextString(m) } -func (*BackingImageResponse) ProtoMessage() {} -func (*BackingImageResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cdf73a3350f27fd7, []int{2} + Spec *BackingImageSpec `protobuf:"bytes,1,opt,name=spec,proto3" json:"spec,omitempty"` + Status *BackingImageStatus `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` } -func (m *BackingImageResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BackingImageResponse.Unmarshal(m, b) -} -func (m *BackingImageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BackingImageResponse.Marshal(b, m, deterministic) -} -func (m *BackingImageResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BackingImageResponse.Merge(m, src) +func (x *BackingImageResponse) Reset() { + *x = BackingImageResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *BackingImageResponse) XXX_Size() int { - return xxx_messageInfo_BackingImageResponse.Size(m) + +func (x *BackingImageResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BackingImageResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BackingImageResponse.DiscardUnknown(m) + +func (*BackingImageResponse) ProtoMessage() {} + +func (x *BackingImageResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_BackingImageResponse proto.InternalMessageInfo +// Deprecated: Use BackingImageResponse.ProtoReflect.Descriptor instead. +func (*BackingImageResponse) Descriptor() ([]byte, []int) { + return file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescGZIP(), []int{2} +} -func (m *BackingImageResponse) GetSpec() *BackingImageSpec { - if m != nil { - return m.Spec +func (x *BackingImageResponse) GetSpec() *BackingImageSpec { + if x != nil { + return x.Spec } return nil } -func (m *BackingImageResponse) GetStatus() *BackingImageStatus { - if m != nil { - return m.Status +func (x *BackingImageResponse) GetStatus() *BackingImageStatus { + if x != nil { + return x.Status } return nil } type DeleteRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *DeleteRequest) Reset() { *m = DeleteRequest{} } -func (m *DeleteRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteRequest) ProtoMessage() {} -func (*DeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cdf73a3350f27fd7, []int{3} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"` } -func (m *DeleteRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteRequest.Unmarshal(m, b) -} -func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteRequest.Marshal(b, m, deterministic) -} -func (m *DeleteRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteRequest.Merge(m, src) +func (x *DeleteRequest) Reset() { + *x = DeleteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *DeleteRequest) XXX_Size() int { - return xxx_messageInfo_DeleteRequest.Size(m) + +func (x *DeleteRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DeleteRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteRequest.DiscardUnknown(m) + +func (*DeleteRequest) ProtoMessage() {} + +func (x *DeleteRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_DeleteRequest proto.InternalMessageInfo +// Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead. +func (*DeleteRequest) Descriptor() ([]byte, []int) { + return file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescGZIP(), []int{3} +} -func (m *DeleteRequest) GetName() string { - if m != nil { - return m.Name +func (x *DeleteRequest) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *DeleteRequest) GetUuid() string { - if m != nil { - return m.Uuid +func (x *DeleteRequest) GetUuid() string { + if x != nil { + return x.Uuid } return "" } type GetRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *GetRequest) Reset() { *m = GetRequest{} } -func (m *GetRequest) String() string { return proto.CompactTextString(m) } -func (*GetRequest) ProtoMessage() {} -func (*GetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cdf73a3350f27fd7, []int{4} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"` } -func (m *GetRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetRequest.Unmarshal(m, b) -} -func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetRequest.Marshal(b, m, deterministic) -} -func (m *GetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetRequest.Merge(m, src) +func (x *GetRequest) Reset() { + *x = GetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GetRequest) XXX_Size() int { - return xxx_messageInfo_GetRequest.Size(m) + +func (x *GetRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetRequest.DiscardUnknown(m) + +func (*GetRequest) ProtoMessage() {} + +func (x *GetRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_GetRequest proto.InternalMessageInfo +// Deprecated: Use GetRequest.ProtoReflect.Descriptor instead. +func (*GetRequest) Descriptor() ([]byte, []int) { + return file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescGZIP(), []int{4} +} -func (m *GetRequest) GetName() string { - if m != nil { - return m.Name +func (x *GetRequest) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *GetRequest) GetUuid() string { - if m != nil { - return m.Uuid +func (x *GetRequest) GetUuid() string { + if x != nil { + return x.Uuid } return "" } type ListResponse struct { - BackingImages map[string]*BackingImageResponse `protobuf:"bytes,1,rep,name=backing_images,json=backingImages,proto3" json:"backing_images,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *ListResponse) Reset() { *m = ListResponse{} } -func (m *ListResponse) String() string { return proto.CompactTextString(m) } -func (*ListResponse) ProtoMessage() {} -func (*ListResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cdf73a3350f27fd7, []int{5} + BackingImages map[string]*BackingImageResponse `protobuf:"bytes,1,rep,name=backing_images,json=backingImages,proto3" json:"backing_images,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (m *ListResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListResponse.Unmarshal(m, b) -} -func (m *ListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListResponse.Marshal(b, m, deterministic) -} -func (m *ListResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListResponse.Merge(m, src) +func (x *ListResponse) Reset() { + *x = ListResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ListResponse) XXX_Size() int { - return xxx_messageInfo_ListResponse.Size(m) + +func (x *ListResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ListResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListResponse.DiscardUnknown(m) + +func (*ListResponse) ProtoMessage() {} + +func (x *ListResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ListResponse proto.InternalMessageInfo +// Deprecated: Use ListResponse.ProtoReflect.Descriptor instead. +func (*ListResponse) Descriptor() ([]byte, []int) { + return file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescGZIP(), []int{5} +} -func (m *ListResponse) GetBackingImages() map[string]*BackingImageResponse { - if m != nil { - return m.BackingImages +func (x *ListResponse) GetBackingImages() map[string]*BackingImageResponse { + if x != nil { + return x.BackingImages } return nil } type VersionResponse struct { - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - GitCommit string `protobuf:"bytes,2,opt,name=gitCommit,proto3" json:"gitCommit,omitempty"` - BuildDate string `protobuf:"bytes,3,opt,name=buildDate,proto3" json:"buildDate,omitempty"` - BackingImageManagerApiVersion int64 `protobuf:"varint,4,opt,name=backing_image_manager_api_version,json=backingImageManagerApiVersion,proto3" json:"backing_image_manager_api_version,omitempty"` - BackingImageManagerApiMinVersion int64 `protobuf:"varint,5,opt,name=backing_image_manager_api_min_version,json=backingImageManagerApiMinVersion,proto3" json:"backing_image_manager_api_min_version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *VersionResponse) Reset() { *m = VersionResponse{} } -func (m *VersionResponse) String() string { return proto.CompactTextString(m) } -func (*VersionResponse) ProtoMessage() {} -func (*VersionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cdf73a3350f27fd7, []int{6} -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *VersionResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_VersionResponse.Unmarshal(m, b) -} -func (m *VersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_VersionResponse.Marshal(b, m, deterministic) + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + GitCommit string `protobuf:"bytes,2,opt,name=gitCommit,proto3" json:"gitCommit,omitempty"` + BuildDate string `protobuf:"bytes,3,opt,name=buildDate,proto3" json:"buildDate,omitempty"` + BackingImageManagerApiVersion int64 `protobuf:"varint,4,opt,name=backing_image_manager_api_version,json=backingImageManagerApiVersion,proto3" json:"backing_image_manager_api_version,omitempty"` + BackingImageManagerApiMinVersion int64 `protobuf:"varint,5,opt,name=backing_image_manager_api_min_version,json=backingImageManagerApiMinVersion,proto3" json:"backing_image_manager_api_min_version,omitempty"` } -func (m *VersionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_VersionResponse.Merge(m, src) + +func (x *VersionResponse) Reset() { + *x = VersionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *VersionResponse) XXX_Size() int { - return xxx_messageInfo_VersionResponse.Size(m) + +func (x *VersionResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *VersionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_VersionResponse.DiscardUnknown(m) + +func (*VersionResponse) ProtoMessage() {} + +func (x *VersionResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_VersionResponse proto.InternalMessageInfo +// Deprecated: Use VersionResponse.ProtoReflect.Descriptor instead. +func (*VersionResponse) Descriptor() ([]byte, []int) { + return file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescGZIP(), []int{6} +} -func (m *VersionResponse) GetVersion() string { - if m != nil { - return m.Version +func (x *VersionResponse) GetVersion() string { + if x != nil { + return x.Version } return "" } -func (m *VersionResponse) GetGitCommit() string { - if m != nil { - return m.GitCommit +func (x *VersionResponse) GetGitCommit() string { + if x != nil { + return x.GitCommit } return "" } -func (m *VersionResponse) GetBuildDate() string { - if m != nil { - return m.BuildDate +func (x *VersionResponse) GetBuildDate() string { + if x != nil { + return x.BuildDate } return "" } -func (m *VersionResponse) GetBackingImageManagerApiVersion() int64 { - if m != nil { - return m.BackingImageManagerApiVersion +func (x *VersionResponse) GetBackingImageManagerApiVersion() int64 { + if x != nil { + return x.BackingImageManagerApiVersion } return 0 } -func (m *VersionResponse) GetBackingImageManagerApiMinVersion() int64 { - if m != nil { - return m.BackingImageManagerApiMinVersion +func (x *VersionResponse) GetBackingImageManagerApiMinVersion() int64 { + if x != nil { + return x.BackingImageManagerApiMinVersion } return 0 } type SyncRequest struct { - Spec *BackingImageSpec `protobuf:"bytes,1,opt,name=spec,proto3" json:"spec,omitempty"` - FromAddress string `protobuf:"bytes,2,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *SyncRequest) Reset() { *m = SyncRequest{} } -func (m *SyncRequest) String() string { return proto.CompactTextString(m) } -func (*SyncRequest) ProtoMessage() {} -func (*SyncRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cdf73a3350f27fd7, []int{7} + Spec *BackingImageSpec `protobuf:"bytes,1,opt,name=spec,proto3" json:"spec,omitempty"` + FromAddress string `protobuf:"bytes,2,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` } -func (m *SyncRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SyncRequest.Unmarshal(m, b) -} -func (m *SyncRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SyncRequest.Marshal(b, m, deterministic) -} -func (m *SyncRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SyncRequest.Merge(m, src) +func (x *SyncRequest) Reset() { + *x = SyncRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SyncRequest) XXX_Size() int { - return xxx_messageInfo_SyncRequest.Size(m) + +func (x *SyncRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SyncRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SyncRequest.DiscardUnknown(m) + +func (*SyncRequest) ProtoMessage() {} + +func (x *SyncRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SyncRequest proto.InternalMessageInfo +// Deprecated: Use SyncRequest.ProtoReflect.Descriptor instead. +func (*SyncRequest) Descriptor() ([]byte, []int) { + return file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescGZIP(), []int{7} +} -func (m *SyncRequest) GetSpec() *BackingImageSpec { - if m != nil { - return m.Spec +func (x *SyncRequest) GetSpec() *BackingImageSpec { + if x != nil { + return x.Spec } return nil } -func (m *SyncRequest) GetFromAddress() string { - if m != nil { - return m.FromAddress +func (x *SyncRequest) GetFromAddress() string { + if x != nil { + return x.FromAddress } return "" } type SendRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"` - ToAddress string `protobuf:"bytes,3,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *SendRequest) Reset() { *m = SendRequest{} } -func (m *SendRequest) String() string { return proto.CompactTextString(m) } -func (*SendRequest) ProtoMessage() {} -func (*SendRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cdf73a3350f27fd7, []int{8} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"` + ToAddress string `protobuf:"bytes,3,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` } -func (m *SendRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SendRequest.Unmarshal(m, b) -} -func (m *SendRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SendRequest.Marshal(b, m, deterministic) -} -func (m *SendRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SendRequest.Merge(m, src) +func (x *SendRequest) Reset() { + *x = SendRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SendRequest) XXX_Size() int { - return xxx_messageInfo_SendRequest.Size(m) + +func (x *SendRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SendRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SendRequest.DiscardUnknown(m) + +func (*SendRequest) ProtoMessage() {} + +func (x *SendRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SendRequest proto.InternalMessageInfo +// Deprecated: Use SendRequest.ProtoReflect.Descriptor instead. +func (*SendRequest) Descriptor() ([]byte, []int) { + return file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescGZIP(), []int{8} +} -func (m *SendRequest) GetName() string { - if m != nil { - return m.Name +func (x *SendRequest) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *SendRequest) GetUuid() string { - if m != nil { - return m.Uuid +func (x *SendRequest) GetUuid() string { + if x != nil { + return x.Uuid } return "" } -func (m *SendRequest) GetToAddress() string { - if m != nil { - return m.ToAddress +func (x *SendRequest) GetToAddress() string { + if x != nil { + return x.ToAddress } return "" } type FetchRequest struct { - Spec *BackingImageSpec `protobuf:"bytes,1,opt,name=spec,proto3" json:"spec,omitempty"` - DataSourceAddress string `protobuf:"bytes,2,opt,name=data_source_address,json=dataSourceAddress,proto3" json:"data_source_address,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *FetchRequest) Reset() { *m = FetchRequest{} } -func (m *FetchRequest) String() string { return proto.CompactTextString(m) } -func (*FetchRequest) ProtoMessage() {} -func (*FetchRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cdf73a3350f27fd7, []int{9} + Spec *BackingImageSpec `protobuf:"bytes,1,opt,name=spec,proto3" json:"spec,omitempty"` + DataSourceAddress string `protobuf:"bytes,2,opt,name=data_source_address,json=dataSourceAddress,proto3" json:"data_source_address,omitempty"` } -func (m *FetchRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FetchRequest.Unmarshal(m, b) -} -func (m *FetchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FetchRequest.Marshal(b, m, deterministic) -} -func (m *FetchRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_FetchRequest.Merge(m, src) +func (x *FetchRequest) Reset() { + *x = FetchRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *FetchRequest) XXX_Size() int { - return xxx_messageInfo_FetchRequest.Size(m) + +func (x *FetchRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *FetchRequest) XXX_DiscardUnknown() { - xxx_messageInfo_FetchRequest.DiscardUnknown(m) + +func (*FetchRequest) ProtoMessage() {} + +func (x *FetchRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_FetchRequest proto.InternalMessageInfo +// Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead. +func (*FetchRequest) Descriptor() ([]byte, []int) { + return file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescGZIP(), []int{9} +} -func (m *FetchRequest) GetSpec() *BackingImageSpec { - if m != nil { - return m.Spec +func (x *FetchRequest) GetSpec() *BackingImageSpec { + if x != nil { + return x.Spec } return nil } -func (m *FetchRequest) GetDataSourceAddress() string { - if m != nil { - return m.DataSourceAddress +func (x *FetchRequest) GetDataSourceAddress() string { + if x != nil { + return x.DataSourceAddress } return "" } type PrepareDownloadRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *PrepareDownloadRequest) Reset() { *m = PrepareDownloadRequest{} } -func (m *PrepareDownloadRequest) String() string { return proto.CompactTextString(m) } -func (*PrepareDownloadRequest) ProtoMessage() {} -func (*PrepareDownloadRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cdf73a3350f27fd7, []int{10} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"` } -func (m *PrepareDownloadRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PrepareDownloadRequest.Unmarshal(m, b) -} -func (m *PrepareDownloadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PrepareDownloadRequest.Marshal(b, m, deterministic) -} -func (m *PrepareDownloadRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PrepareDownloadRequest.Merge(m, src) +func (x *PrepareDownloadRequest) Reset() { + *x = PrepareDownloadRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *PrepareDownloadRequest) XXX_Size() int { - return xxx_messageInfo_PrepareDownloadRequest.Size(m) + +func (x *PrepareDownloadRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *PrepareDownloadRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PrepareDownloadRequest.DiscardUnknown(m) + +func (*PrepareDownloadRequest) ProtoMessage() {} + +func (x *PrepareDownloadRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_PrepareDownloadRequest proto.InternalMessageInfo +// Deprecated: Use PrepareDownloadRequest.ProtoReflect.Descriptor instead. +func (*PrepareDownloadRequest) Descriptor() ([]byte, []int) { + return file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescGZIP(), []int{10} +} -func (m *PrepareDownloadRequest) GetName() string { - if m != nil { - return m.Name +func (x *PrepareDownloadRequest) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *PrepareDownloadRequest) GetUuid() string { - if m != nil { - return m.Uuid +func (x *PrepareDownloadRequest) GetUuid() string { + if x != nil { + return x.Uuid } return "" } type PrepareDownloadResponse struct { - SrcFilePath string `protobuf:"bytes,1,opt,name=src_file_path,json=srcFilePath,proto3" json:"src_file_path,omitempty"` - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *PrepareDownloadResponse) Reset() { *m = PrepareDownloadResponse{} } -func (m *PrepareDownloadResponse) String() string { return proto.CompactTextString(m) } -func (*PrepareDownloadResponse) ProtoMessage() {} -func (*PrepareDownloadResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cdf73a3350f27fd7, []int{11} + SrcFilePath string `protobuf:"bytes,1,opt,name=src_file_path,json=srcFilePath,proto3" json:"src_file_path,omitempty"` + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` } -func (m *PrepareDownloadResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PrepareDownloadResponse.Unmarshal(m, b) -} -func (m *PrepareDownloadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PrepareDownloadResponse.Marshal(b, m, deterministic) -} -func (m *PrepareDownloadResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PrepareDownloadResponse.Merge(m, src) +func (x *PrepareDownloadResponse) Reset() { + *x = PrepareDownloadResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *PrepareDownloadResponse) XXX_Size() int { - return xxx_messageInfo_PrepareDownloadResponse.Size(m) + +func (x *PrepareDownloadResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *PrepareDownloadResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PrepareDownloadResponse.DiscardUnknown(m) + +func (*PrepareDownloadResponse) ProtoMessage() {} + +func (x *PrepareDownloadResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_PrepareDownloadResponse proto.InternalMessageInfo +// Deprecated: Use PrepareDownloadResponse.ProtoReflect.Descriptor instead. +func (*PrepareDownloadResponse) Descriptor() ([]byte, []int) { + return file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescGZIP(), []int{11} +} -func (m *PrepareDownloadResponse) GetSrcFilePath() string { - if m != nil { - return m.SrcFilePath +func (x *PrepareDownloadResponse) GetSrcFilePath() string { + if x != nil { + return x.SrcFilePath } return "" } -func (m *PrepareDownloadResponse) GetAddress() string { - if m != nil { - return m.Address +func (x *PrepareDownloadResponse) GetAddress() string { + if x != nil { + return x.Address } return "" } -func init() { - proto.RegisterType((*BackingImageSpec)(nil), "longhorn.backingimagemanager.pkg.rpc.BackingImageSpec") - proto.RegisterType((*BackingImageStatus)(nil), "longhorn.backingimagemanager.pkg.rpc.BackingImageStatus") - proto.RegisterType((*BackingImageResponse)(nil), "longhorn.backingimagemanager.pkg.rpc.BackingImageResponse") - proto.RegisterType((*DeleteRequest)(nil), "longhorn.backingimagemanager.pkg.rpc.DeleteRequest") - proto.RegisterType((*GetRequest)(nil), "longhorn.backingimagemanager.pkg.rpc.GetRequest") - proto.RegisterType((*ListResponse)(nil), "longhorn.backingimagemanager.pkg.rpc.ListResponse") - proto.RegisterMapType((map[string]*BackingImageResponse)(nil), "longhorn.backingimagemanager.pkg.rpc.ListResponse.BackingImagesEntry") - proto.RegisterType((*VersionResponse)(nil), "longhorn.backingimagemanager.pkg.rpc.VersionResponse") - proto.RegisterType((*SyncRequest)(nil), "longhorn.backingimagemanager.pkg.rpc.SyncRequest") - proto.RegisterType((*SendRequest)(nil), "longhorn.backingimagemanager.pkg.rpc.SendRequest") - proto.RegisterType((*FetchRequest)(nil), "longhorn.backingimagemanager.pkg.rpc.FetchRequest") - proto.RegisterType((*PrepareDownloadRequest)(nil), "longhorn.backingimagemanager.pkg.rpc.PrepareDownloadRequest") - proto.RegisterType((*PrepareDownloadResponse)(nil), "longhorn.backingimagemanager.pkg.rpc.PrepareDownloadResponse") -} - -func init() { - proto.RegisterFile("github.com/longhorn/backing-image-manager/pkg/rpc/rpc.proto", fileDescriptor_cdf73a3350f27fd7) -} - -var fileDescriptor_cdf73a3350f27fd7 = []byte{ - // 871 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x41, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xc6, 0x76, 0xda, 0x3c, 0x27, 0x34, 0x1d, 0xa2, 0x60, 0xb9, 0x54, 0x4a, 0x57, 0x20, - 0x45, 0x42, 0x5d, 0x17, 0xb7, 0x40, 0xd5, 0x82, 0x04, 0x21, 0x69, 0x01, 0x11, 0x11, 0xad, 0x2b, - 0x22, 0xc1, 0x61, 0xb5, 0x5e, 0xbf, 0xac, 0x07, 0xef, 0xce, 0x2c, 0x33, 0xb3, 0xa9, 0x8c, 0x7a, - 0xe2, 0xc8, 0x89, 0x1f, 0xc3, 0x81, 0xdf, 0xc3, 0xcf, 0xe0, 0x84, 0x66, 0x76, 0x76, 0x63, 0xbb, - 0x35, 0x5a, 0x27, 0x70, 0xb0, 0x34, 0xf3, 0xde, 0xbc, 0x6f, 0xde, 0xf7, 0xf9, 0x7d, 0xb3, 0xf0, - 0x34, 0xa6, 0x6a, 0x9c, 0x0f, 0xbd, 0x88, 0xa7, 0xbd, 0x84, 0xb3, 0x78, 0xcc, 0x05, 0xeb, 0x0d, - 0xc3, 0x68, 0x42, 0x59, 0x7c, 0x9f, 0xa6, 0x61, 0x8c, 0xf7, 0xd3, 0x90, 0x85, 0x31, 0x8a, 0x5e, - 0x36, 0x89, 0x7b, 0x22, 0x8b, 0xf4, 0xcf, 0xcb, 0x04, 0x57, 0x9c, 0xbc, 0x57, 0x56, 0x78, 0xb6, - 0xc2, 0x14, 0xd8, 0xf3, 0x5e, 0x36, 0x89, 0x3d, 0x91, 0x45, 0xdd, 0x3b, 0x31, 0xe7, 0x71, 0x82, - 0x3d, 0x53, 0x33, 0xcc, 0xcf, 0x7b, 0x98, 0x66, 0x6a, 0x5a, 0x40, 0xb8, 0x3f, 0xc1, 0xce, 0x61, - 0x51, 0xfb, 0xb5, 0xae, 0x1d, 0x64, 0x18, 0x11, 0x02, 0x4d, 0x16, 0xa6, 0xd8, 0x71, 0xf6, 0x9d, - 0x83, 0x4d, 0xdf, 0xac, 0x75, 0x2c, 0xcf, 0xe9, 0xa8, 0xb3, 0x5e, 0xc4, 0xf4, 0x5a, 0xc7, 0x24, - 0xfd, 0x05, 0x3b, 0x8d, 0x7d, 0xe7, 0xa0, 0xe1, 0x9b, 0x35, 0xe9, 0xc2, 0xcd, 0x68, 0x8c, 0xd1, - 0x44, 0xe6, 0x69, 0xa7, 0x69, 0xce, 0x56, 0x7b, 0xf7, 0x2f, 0x07, 0xc8, 0xdc, 0x65, 0x2a, 0x54, - 0xb9, 0x24, 0xbb, 0xd0, 0x92, 0x2a, 0x54, 0xe5, 0x7d, 0xc5, 0x86, 0xdc, 0x81, 0x4d, 0x14, 0x82, - 0x8b, 0x20, 0x95, 0xb1, 0xbd, 0xf5, 0xa6, 0x09, 0x9c, 0xc8, 0x98, 0x7c, 0x00, 0xb7, 0x25, 0xb2, - 0x11, 0x65, 0x71, 0x20, 0xf0, 0x1c, 0x05, 0xb2, 0xa8, 0x68, 0xa3, 0xe5, 0xef, 0xd8, 0x84, 0x5f, - 0xc6, 0xc9, 0x23, 0xd8, 0xd3, 0x31, 0x14, 0x81, 0x55, 0x26, 0x08, 0x47, 0x23, 0x81, 0x52, 0xda, - 0x06, 0x77, 0x8b, 0xec, 0x49, 0x91, 0xfc, 0xa2, 0xc8, 0x69, 0x22, 0x99, 0xe0, 0xb1, 0x39, 0xd7, - 0x32, 0xc8, 0xd5, 0x7e, 0x8e, 0xe4, 0xc6, 0x02, 0xc9, 0x3f, 0x1c, 0xd8, 0x9d, 0x25, 0xe9, 0xa3, - 0xcc, 0x38, 0x93, 0x48, 0xbe, 0x81, 0xa6, 0xcc, 0x30, 0x32, 0x2c, 0xdb, 0xfd, 0x8f, 0xbd, 0x3a, - 0xff, 0x9d, 0xb7, 0xf8, 0xdf, 0xf8, 0x06, 0x83, 0x9c, 0xc2, 0x86, 0x34, 0xe2, 0x19, 0x65, 0xda, - 0xfd, 0xc7, 0x57, 0x40, 0x33, 0xf5, 0xbe, 0xc5, 0x71, 0x3f, 0x81, 0xed, 0x23, 0x4c, 0x50, 0xa1, - 0x8f, 0x3f, 0xe7, 0x28, 0x55, 0xdd, 0x21, 0x70, 0x1f, 0x01, 0x3c, 0x47, 0xb5, 0x6a, 0xd5, 0xdf, - 0x0e, 0x6c, 0x7d, 0x4b, 0xa5, 0xaa, 0xd4, 0x49, 0xe0, 0x2d, 0xdb, 0x79, 0x60, 0x5a, 0x97, 0x1d, - 0x67, 0xbf, 0x71, 0xd0, 0xee, 0x1f, 0xd7, 0x63, 0x36, 0x8b, 0x35, 0x47, 0x53, 0x1e, 0x33, 0x25, - 0xa6, 0xfe, 0xf6, 0x70, 0x36, 0xd6, 0x7d, 0x35, 0x3f, 0x88, 0xc5, 0x21, 0xb2, 0x03, 0x8d, 0x09, - 0x4e, 0x6d, 0xef, 0x7a, 0x49, 0x4e, 0xa1, 0x75, 0x11, 0x26, 0x39, 0x5a, 0x99, 0x9f, 0xac, 0x2e, - 0x73, 0xd9, 0x94, 0x5f, 0x00, 0x3d, 0x59, 0x7f, 0xec, 0xb8, 0xbf, 0xae, 0xc3, 0xad, 0xef, 0x51, - 0x48, 0xca, 0x59, 0xc5, 0xbf, 0x03, 0x37, 0x2e, 0x8a, 0x90, 0xbd, 0xbf, 0xdc, 0x92, 0x77, 0x61, - 0x33, 0xa6, 0xea, 0x4b, 0x9e, 0xa6, 0x54, 0x59, 0x0d, 0x2f, 0x03, 0x3a, 0x3b, 0xcc, 0x69, 0x32, - 0x3a, 0xd2, 0x06, 0x6a, 0x14, 0xd9, 0x2a, 0x40, 0xbe, 0x82, 0x7b, 0x73, 0xaa, 0x5e, 0x3a, 0x20, - 0xa3, 0x41, 0x79, 0x5f, 0xd3, 0xd8, 0xf7, 0xee, 0xac, 0x42, 0xa5, 0x17, 0x32, 0x6a, 0xfb, 0x24, - 0xdf, 0xc1, 0xfb, 0xcb, 0x91, 0x52, 0xca, 0x2a, 0xb4, 0x96, 0x41, 0xdb, 0x7f, 0x33, 0xda, 0x09, - 0x65, 0x16, 0xd0, 0x7d, 0x05, 0xed, 0xc1, 0x94, 0x45, 0xe5, 0xe0, 0xfc, 0x97, 0xee, 0xb8, 0x07, - 0x5b, 0xe7, 0x82, 0xa7, 0x95, 0xcd, 0x0b, 0xd1, 0xda, 0x3a, 0x66, 0xdd, 0xed, 0xbe, 0x80, 0xf6, - 0x00, 0xd9, 0x68, 0xc5, 0xb1, 0x25, 0x77, 0x01, 0x14, 0xaf, 0x70, 0xad, 0xdc, 0x8a, 0x97, 0xa8, - 0xbf, 0x39, 0xb0, 0xf5, 0x0c, 0x55, 0x34, 0xfe, 0x3f, 0x58, 0x79, 0xf0, 0xf6, 0x28, 0x54, 0x61, - 0x20, 0x79, 0x2e, 0x22, 0x5c, 0x20, 0x77, 0x5b, 0xa7, 0x06, 0x26, 0x53, 0x36, 0xf3, 0x39, 0xec, - 0x9d, 0x0a, 0xcc, 0x42, 0x81, 0x47, 0xfc, 0x25, 0x4b, 0x78, 0xb8, 0x2a, 0x5b, 0xf7, 0x0c, 0xde, - 0x79, 0x0d, 0xc1, 0x8e, 0xab, 0x0b, 0xdb, 0x52, 0x44, 0xc1, 0x39, 0x4d, 0x30, 0xc8, 0x42, 0x35, - 0xb6, 0x58, 0x6d, 0x29, 0xa2, 0x67, 0x34, 0xc1, 0xd3, 0x50, 0x8d, 0xf5, 0x48, 0xcf, 0x37, 0x59, - 0x6e, 0xfb, 0x7f, 0xde, 0x80, 0xee, 0xe1, 0xeb, 0x03, 0x32, 0x40, 0x71, 0x41, 0x23, 0x24, 0x67, - 0xb0, 0x51, 0xbc, 0x45, 0xe4, 0x61, 0x3d, 0xc5, 0xe6, 0x5e, 0xae, 0xee, 0x9e, 0x57, 0x7c, 0xf0, - 0xbc, 0xf2, 0x83, 0xe7, 0x1d, 0xeb, 0x0f, 0x9e, 0xbb, 0x46, 0x72, 0x68, 0x3c, 0x47, 0x45, 0x1e, - 0xd4, 0x43, 0xbd, 0x7c, 0xd6, 0xba, 0xd7, 0x30, 0xbe, 0xbb, 0x46, 0x5e, 0x40, 0x53, 0xbf, 0x4f, - 0x64, 0x49, 0x63, 0xdd, 0xfe, 0xea, 0x6f, 0x9c, 0xbb, 0x46, 0x7e, 0x04, 0xb0, 0x5e, 0xd2, 0x9c, - 0x96, 0x61, 0x7f, 0x54, 0x0f, 0x7b, 0xf1, 0x39, 0x7a, 0x09, 0x4d, 0xed, 0x4e, 0xf2, 0x61, 0xbd, - 0xf2, 0x19, 0x27, 0x5f, 0x53, 0xab, 0x01, 0x34, 0xb5, 0x31, 0x6b, 0x5f, 0x7c, 0x69, 0xe2, 0x7f, - 0xf9, 0xdf, 0xa7, 0xd0, 0x32, 0xb6, 0x24, 0x35, 0x95, 0x9e, 0xf5, 0xf0, 0x35, 0xf9, 0xfc, 0xee, - 0xc0, 0xad, 0x05, 0x13, 0x91, 0x4f, 0xeb, 0x21, 0xbe, 0xd9, 0xbd, 0xdd, 0xcf, 0xae, 0x58, 0x5d, - 0xb5, 0xf4, 0x14, 0x5a, 0x67, 0xa1, 0x56, 0x63, 0xd9, 0xcc, 0x2c, 0x15, 0xf2, 0x81, 0x73, 0xd8, - 0xfa, 0xa1, 0x21, 0xb2, 0x68, 0xb8, 0x61, 0x52, 0x0f, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x55, - 0xf9, 0xcf, 0x15, 0xbf, 0x0a, 0x00, 0x00, +var File_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto protoreflect.FileDescriptor + +var file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDesc = []byte{ + 0x0a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x6f, 0x6e, + 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x2d, 0x69, 0x6d, + 0x61, 0x67, 0x65, 0x2d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, + 0x72, 0x70, 0x63, 0x2f, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x24, 0x6c, + 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, + 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, + 0x72, 0x70, 0x63, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x8c, 0x01, 0x0a, 0x10, 0x42, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, + 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x20, 0x0a, + 0x0b, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0b, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x22, + 0xe2, 0x01, 0x0a, 0x12, 0x42, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x09, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x73, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, + 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x73, 0x75, 0x6d, 0x22, 0xb4, 0x01, 0x0a, 0x14, 0x42, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, + 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6c, 0x6f, + 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, + 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, + 0x70, 0x63, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, + 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x50, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, + 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x37, 0x0a, 0x0d, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x75, 0x75, 0x69, 0x64, 0x22, 0x34, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0xfa, 0x01, 0x0a, 0x0c, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x0e, 0x62, + 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, + 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, + 0x6d, 0x61, 0x67, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x62, 0x61, 0x63, 0x6b, + 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x1a, 0x7c, 0x0a, 0x12, 0x42, 0x61, 0x63, + 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x50, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x3a, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, + 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, + 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, + 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x82, 0x02, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x69, 0x74, 0x43, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x44, 0x61, 0x74, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x44, 0x61, 0x74, + 0x65, 0x12, 0x48, 0x0a, 0x21, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6d, 0x61, + 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1d, 0x62, 0x61, + 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x25, 0x62, + 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x20, 0x62, 0x61, 0x63, 0x6b, + 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x41, + 0x70, 0x69, 0x4d, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x7c, 0x0a, 0x0b, + 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x04, 0x73, + 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, + 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x70, 0x65, + 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, + 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x54, 0x0a, 0x0b, 0x53, 0x65, + 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, + 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x22, 0x8a, 0x01, 0x0a, 0x0c, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x4a, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x36, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, + 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, + 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6d, + 0x61, 0x67, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x2e, 0x0a, + 0x13, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x64, 0x61, 0x74, 0x61, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x40, 0x0a, + 0x16, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, + 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, + 0x57, 0x0a, 0x17, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, + 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x73, 0x72, + 0x63, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x73, 0x72, 0x63, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x32, 0xb8, 0x07, 0x0a, 0x1a, 0x42, 0x61, 0x63, + 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x57, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x12, 0x33, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, + 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, + 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, + 0x12, 0x75, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x30, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, + 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x47, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, + 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x32, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, + 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, + 0x0a, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x1a, 0x35, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, + 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x77, 0x0a, 0x04, 0x53, 0x79, + 0x6e, 0x63, 0x12, 0x31, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, + 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, + 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x63, + 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x04, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x31, 0x2e, 0x6c, 0x6f, + 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, + 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, + 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x79, 0x0a, 0x05, 0x46, 0x65, 0x74, 0x63, + 0x68, 0x12, 0x32, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, + 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, + 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, + 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x63, + 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x90, 0x01, 0x0a, 0x0f, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x44, + 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x3c, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, + 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x50, + 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, + 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x65, + 0x70, 0x61, 0x72, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x05, 0x57, 0x61, 0x74, 0x63, 0x68, 0x12, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, + 0x00, 0x30, 0x01, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x69, + 0x6e, 0x67, 0x2d, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, + 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescOnce sync.Once + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescData = file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDesc +) + +func file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescGZIP() []byte { + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescOnce.Do(func() { + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescData) + }) + return file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescData +} + +var file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_goTypes = []interface{}{ + (*BackingImageSpec)(nil), // 0: longhorn.backingimagemanager.pkg.rpc.BackingImageSpec + (*BackingImageStatus)(nil), // 1: longhorn.backingimagemanager.pkg.rpc.BackingImageStatus + (*BackingImageResponse)(nil), // 2: longhorn.backingimagemanager.pkg.rpc.BackingImageResponse + (*DeleteRequest)(nil), // 3: longhorn.backingimagemanager.pkg.rpc.DeleteRequest + (*GetRequest)(nil), // 4: longhorn.backingimagemanager.pkg.rpc.GetRequest + (*ListResponse)(nil), // 5: longhorn.backingimagemanager.pkg.rpc.ListResponse + (*VersionResponse)(nil), // 6: longhorn.backingimagemanager.pkg.rpc.VersionResponse + (*SyncRequest)(nil), // 7: longhorn.backingimagemanager.pkg.rpc.SyncRequest + (*SendRequest)(nil), // 8: longhorn.backingimagemanager.pkg.rpc.SendRequest + (*FetchRequest)(nil), // 9: longhorn.backingimagemanager.pkg.rpc.FetchRequest + (*PrepareDownloadRequest)(nil), // 10: longhorn.backingimagemanager.pkg.rpc.PrepareDownloadRequest + (*PrepareDownloadResponse)(nil), // 11: longhorn.backingimagemanager.pkg.rpc.PrepareDownloadResponse + nil, // 12: longhorn.backingimagemanager.pkg.rpc.ListResponse.BackingImagesEntry + (*empty.Empty)(nil), // 13: google.protobuf.Empty +} +var file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_depIdxs = []int32{ + 0, // 0: longhorn.backingimagemanager.pkg.rpc.BackingImageResponse.spec:type_name -> longhorn.backingimagemanager.pkg.rpc.BackingImageSpec + 1, // 1: longhorn.backingimagemanager.pkg.rpc.BackingImageResponse.status:type_name -> longhorn.backingimagemanager.pkg.rpc.BackingImageStatus + 12, // 2: longhorn.backingimagemanager.pkg.rpc.ListResponse.backing_images:type_name -> longhorn.backingimagemanager.pkg.rpc.ListResponse.BackingImagesEntry + 0, // 3: longhorn.backingimagemanager.pkg.rpc.SyncRequest.spec:type_name -> longhorn.backingimagemanager.pkg.rpc.BackingImageSpec + 0, // 4: longhorn.backingimagemanager.pkg.rpc.FetchRequest.spec:type_name -> longhorn.backingimagemanager.pkg.rpc.BackingImageSpec + 2, // 5: longhorn.backingimagemanager.pkg.rpc.ListResponse.BackingImagesEntry.value:type_name -> longhorn.backingimagemanager.pkg.rpc.BackingImageResponse + 3, // 6: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.Delete:input_type -> longhorn.backingimagemanager.pkg.rpc.DeleteRequest + 4, // 7: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.Get:input_type -> longhorn.backingimagemanager.pkg.rpc.GetRequest + 13, // 8: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.List:input_type -> google.protobuf.Empty + 13, // 9: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.VersionGet:input_type -> google.protobuf.Empty + 7, // 10: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.Sync:input_type -> longhorn.backingimagemanager.pkg.rpc.SyncRequest + 8, // 11: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.Send:input_type -> longhorn.backingimagemanager.pkg.rpc.SendRequest + 9, // 12: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.Fetch:input_type -> longhorn.backingimagemanager.pkg.rpc.FetchRequest + 10, // 13: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.PrepareDownload:input_type -> longhorn.backingimagemanager.pkg.rpc.PrepareDownloadRequest + 13, // 14: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.Watch:input_type -> google.protobuf.Empty + 13, // 15: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.Delete:output_type -> google.protobuf.Empty + 2, // 16: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.Get:output_type -> longhorn.backingimagemanager.pkg.rpc.BackingImageResponse + 5, // 17: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.List:output_type -> longhorn.backingimagemanager.pkg.rpc.ListResponse + 6, // 18: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.VersionGet:output_type -> longhorn.backingimagemanager.pkg.rpc.VersionResponse + 2, // 19: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.Sync:output_type -> longhorn.backingimagemanager.pkg.rpc.BackingImageResponse + 13, // 20: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.Send:output_type -> google.protobuf.Empty + 2, // 21: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.Fetch:output_type -> longhorn.backingimagemanager.pkg.rpc.BackingImageResponse + 11, // 22: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.PrepareDownload:output_type -> longhorn.backingimagemanager.pkg.rpc.PrepareDownloadResponse + 13, // 23: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.Watch:output_type -> google.protobuf.Empty + 15, // [15:24] is the sub-list for method output_type + 6, // [6:15] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_init() } +func file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_init() { + if File_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BackingImageSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BackingImageStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BackingImageResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VersionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SyncRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SendRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrepareDownloadRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrepareDownloadResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDesc, + NumEnums: 0, + NumMessages: 13, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_goTypes, + DependencyIndexes: file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_depIdxs, + MessageInfos: file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes, + }.Build() + File_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto = out.File + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDesc = nil + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_goTypes = nil + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_depIdxs = nil } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConn +var _ grpc.ClientConnInterface // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +const _ = grpc.SupportPackageIsVersion6 // BackingImageManagerServiceClient is the client API for BackingImageManagerService service. // @@ -764,10 +1203,10 @@ type BackingImageManagerServiceClient interface { } type backingImageManagerServiceClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewBackingImageManagerServiceClient(cc *grpc.ClientConn) BackingImageManagerServiceClient { +func NewBackingImageManagerServiceClient(cc grpc.ClientConnInterface) BackingImageManagerServiceClient { return &backingImageManagerServiceClient{cc} } @@ -892,31 +1331,31 @@ type BackingImageManagerServiceServer interface { type UnimplementedBackingImageManagerServiceServer struct { } -func (*UnimplementedBackingImageManagerServiceServer) Delete(ctx context.Context, req *DeleteRequest) (*empty.Empty, error) { +func (*UnimplementedBackingImageManagerServiceServer) Delete(context.Context, *DeleteRequest) (*empty.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") } -func (*UnimplementedBackingImageManagerServiceServer) Get(ctx context.Context, req *GetRequest) (*BackingImageResponse, error) { +func (*UnimplementedBackingImageManagerServiceServer) Get(context.Context, *GetRequest) (*BackingImageResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") } -func (*UnimplementedBackingImageManagerServiceServer) List(ctx context.Context, req *empty.Empty) (*ListResponse, error) { +func (*UnimplementedBackingImageManagerServiceServer) List(context.Context, *empty.Empty) (*ListResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method List not implemented") } -func (*UnimplementedBackingImageManagerServiceServer) VersionGet(ctx context.Context, req *empty.Empty) (*VersionResponse, error) { +func (*UnimplementedBackingImageManagerServiceServer) VersionGet(context.Context, *empty.Empty) (*VersionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method VersionGet not implemented") } -func (*UnimplementedBackingImageManagerServiceServer) Sync(ctx context.Context, req *SyncRequest) (*BackingImageResponse, error) { +func (*UnimplementedBackingImageManagerServiceServer) Sync(context.Context, *SyncRequest) (*BackingImageResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented") } -func (*UnimplementedBackingImageManagerServiceServer) Send(ctx context.Context, req *SendRequest) (*empty.Empty, error) { +func (*UnimplementedBackingImageManagerServiceServer) Send(context.Context, *SendRequest) (*empty.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Send not implemented") } -func (*UnimplementedBackingImageManagerServiceServer) Fetch(ctx context.Context, req *FetchRequest) (*BackingImageResponse, error) { +func (*UnimplementedBackingImageManagerServiceServer) Fetch(context.Context, *FetchRequest) (*BackingImageResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented") } -func (*UnimplementedBackingImageManagerServiceServer) PrepareDownload(ctx context.Context, req *PrepareDownloadRequest) (*PrepareDownloadResponse, error) { +func (*UnimplementedBackingImageManagerServiceServer) PrepareDownload(context.Context, *PrepareDownloadRequest) (*PrepareDownloadResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PrepareDownload not implemented") } -func (*UnimplementedBackingImageManagerServiceServer) Watch(req *empty.Empty, srv BackingImageManagerService_WatchServer) error { +func (*UnimplementedBackingImageManagerServiceServer) Watch(*empty.Empty, BackingImageManagerService_WatchServer) error { return status.Errorf(codes.Unimplemented, "method Watch not implemented") } diff --git a/vendor/github.com/longhorn/backing-image-manager/pkg/rpc/rpc.proto b/vendor/github.com/longhorn/backing-image-manager/pkg/rpc/rpc.proto index b3225cb520..d3e7d56994 100644 --- a/vendor/github.com/longhorn/backing-image-manager/pkg/rpc/rpc.proto +++ b/vendor/github.com/longhorn/backing-image-manager/pkg/rpc/rpc.proto @@ -4,7 +4,7 @@ package longhorn.backingimagemanager.pkg.rpc; import "google/protobuf/empty.proto"; -option go_package = "rpc"; +option go_package = "github.com/longhorn/backing-image-manager/pkg/rpc"; service BackingImageManagerService { rpc Delete(DeleteRequest) returns (google.protobuf.Empty) {} @@ -24,6 +24,7 @@ message BackingImageSpec { string uuid = 2; int64 size = 3; string checksum = 4; + int64 virtualSize = 5; } message BackingImageStatus { diff --git a/vendor/github.com/longhorn/backing-image-manager/pkg/util/util.go b/vendor/github.com/longhorn/backing-image-manager/pkg/util/util.go index 76a0d48d84..2dc6458b99 100644 --- a/vendor/github.com/longhorn/backing-image-manager/pkg/util/util.go +++ b/vendor/github.com/longhorn/backing-image-manager/pkg/util/util.go @@ -1,7 +1,6 @@ package util import ( - "bufio" "bytes" "compress/gzip" "context" @@ -13,7 +12,6 @@ import ( "os" "os/exec" "path/filepath" - "strings" "time" "github.com/pkg/errors" @@ -150,6 +148,7 @@ type SyncingFileConfig struct { FilePath string `json:"name"` UUID string `json:"uuid"` Size int64 `json:"size"` + VirtualSize int64 `json:"virtualSize"` ExpectedChecksum string `json:"expectedChecksum"` CurrentChecksum string `json:"currentChecksum"` ModificationTime string `json:"modificationTime"` @@ -230,48 +229,60 @@ func ExecuteWithTimeout(timeout time.Duration, envs []string, binary string, arg return output.String(), nil } -func DetectFileFormat(filePath string) (string, error) { +type QemuImgInfo struct { + // For qcow2 files, VirtualSize may be larger than the physical + // image size on disk. For raw files, `qemu-img info` will report + // VirtualSize as being the same as the physical file size. + VirtualSize int64 `json:"virtual-size"` + Format string `json:"format"` +} + +func GetQemuImgInfo(filePath string) (imgInfo QemuImgInfo, err error) { /* Example command outputs - $ qemu-img info parrot.raw - image: parrot.raw - file format: raw - virtual size: 32M (33554432 bytes) - disk size: 2.2M - - $ qemu-img info parrot.qcow2 - image: parrot.qcow2 - file format: qcow2 - virtual size: 32M (33554432 bytes) - disk size: 2.3M - cluster_size: 65536 - Format specific information: - compat: 1.1 - lazy refcounts: false - refcount bits: 16 - corrupt: false + $ qemu-img info --output=json SLE-Micro.x86_64-5.5.0-Default-qcow-GM.qcow2 + { + "virtual-size": 21474836480, + "filename": "SLE-Micro.x86_64-5.5.0-Default-qcow-GM.qcow2", + "cluster-size": 65536, + "format": "qcow2", + "actual-size": 1001656320, + "format-specific": { + "type": "qcow2", + "data": { + "compat": "1.1", + "compression-type": "zlib", + "lazy-refcounts": false, + "refcount-bits": 16, + "corrupt": false, + "extended-l2": false + } + }, + "dirty-flag": false + } + + $ qemu-img info --output=json SLE-15-SP5-Full-x86_64-GM-Media1.iso + { + "virtual-size": 14548992000, + "filename": "SLE-15-SP5-Full-x86_64-GM-Media1.iso", + "format": "raw", + "actual-size": 14548996096, + "dirty-flag": false + } */ - output, err := Execute([]string{}, QemuImgBinary, "info", filePath) + output, err := Execute([]string{}, QemuImgBinary, "info", "--output=json", filePath) if err != nil { - return "", err + return } - - scanner := bufio.NewScanner(strings.NewReader(output)) - for scanner.Scan() { - line := strings.TrimSpace(scanner.Text()) - if strings.HasPrefix(line, "file format: ") { - return strings.TrimPrefix(line, "file format: "), nil - } - } - - return "", fmt.Errorf("cannot find the file format in the output %s", output) + err = json.Unmarshal([]byte(output), &imgInfo) + return } func ConvertFromRawToQcow2(filePath string) error { - if format, err := DetectFileFormat(filePath); err != nil { + if imgInfo, err := GetQemuImgInfo(filePath); err != nil { return err - } else if format == "qcow2" { + } else if imgInfo.Format == "qcow2" { return nil } diff --git a/vendor/modules.txt b/vendor/modules.txt index b04bd79550..3c63c5b257 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -217,7 +217,7 @@ github.com/kubernetes-csi/csi-lib-utils/protosanitizer # github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de ## explicit github.com/liggitt/tabwriter -# github.com/longhorn/backing-image-manager v1.5.4 +# github.com/longhorn/backing-image-manager v1.5.5-rc1 ## explicit; go 1.21 github.com/longhorn/backing-image-manager/api github.com/longhorn/backing-image-manager/pkg/client From 6952835371d8315505f2713b584d37bd6caeb5a7 Mon Sep 17 00:00:00 2001 From: Tim Serong Date: Fri, 23 Feb 2024 19:52:05 +1100 Subject: [PATCH 2/3] Expose virtual size of backing images This commit adds virtualSize to the BackingImageStatus and BackingImageFileInfo structs, and thus to the BackingImage and BackingImageManager CRDs. We can see how this works in practice by creating a new backing image downloaded from a URL, then periodically running `kubectl -n longhorn-system get lhbi`. I'm using https://download.opensuse.org/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2 in the example below. Initially, when the download is just started, before the file size is known: ``` > kubectl -n longhorn-system get lhbi/default-image-7mplj NAME UUID SOURCETYPE SIZE VIRTUALSIZE AGE default-image-7mplj 6d5a98b0 download 0 0 9s ``` A little later, while the download is running: ``` > kubectl -n longhorn-system get lhbi/default-image-7mplj NAME UUID SOURCETYPE SIZE VIRTUALSIZE AGE default-image-7mplj 6d5a98b0 download 255701504 0 3m33s ``` Finally, once the download is complete: ``` > kubectl -n longhorn-system get lhbi/default-image-7mplj NAME UUID SOURCETYPE SIZE VIRTUALSIZE AGE default-image-7mplj 6d5a98b0 download 255701504 821035008 4m26s ``` Compare size and virtualSize above with the image downloaded manually: ``` > wget https://download.opensuse.org/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2 [...] > ls -l openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2 -rw-r--r-- 1 tserong users 255701504 Dec 19 23:26 openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2 > qemu-img info openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2 | grep virtual virtual size: 783 MiB (821035008 bytes) ``` Related issue: https://github.com/longhorn/longhorn/issues/7923 Signed-off-by: Tim Serong (cherry picked from commit d438e9b238dd7381d143faf452252f5cff08b32c) --- controller/backing_image_controller.go | 10 ++++++++++ engineapi/backing_image_manager.go | 7 ++++--- k8s/crds.yaml | 11 +++++++++++ k8s/pkg/apis/longhorn/v1beta2/backingimage.go | 4 ++++ k8s/pkg/apis/longhorn/v1beta2/backingimagemanager.go | 2 ++ 5 files changed, 31 insertions(+), 3 deletions(-) diff --git a/controller/backing_image_controller.go b/controller/backing_image_controller.go index 3b7c59cc6e..3de5dfb801 100644 --- a/controller/backing_image_controller.go +++ b/controller/backing_image_controller.go @@ -666,6 +666,16 @@ func (bic *BackingImageController) syncBackingImageFileInfo(bi *longhorn.Backing return fmt.Errorf("found mismatching size %v reported by backing image manager %v in disk %v, the size recorded in status is %v", info.Size, bim.Name, bim.Spec.DiskUUID, bi.Status.Size) } } + if info.VirtualSize > 0 { + if bi.Status.VirtualSize == 0 { + bi.Status.VirtualSize = info.VirtualSize + bic.eventRecorder.Eventf(bi, corev1.EventTypeNormal, constant.EventReasonUpdate, "Set virtualSize to %v", bi.Status.VirtualSize) + } + if bi.Status.VirtualSize != info.VirtualSize { + return fmt.Errorf("found mismatching virtualSize %v reported by backing image manager %v in disk %v, the virtualSize recorded in status is %v", + info.VirtualSize, bim.Name, bim.Spec.DiskUUID, bi.Status.VirtualSize) + } + } } for diskUUID := range bi.Status.DiskFileStatusMap { diff --git a/engineapi/backing_image_manager.go b/engineapi/backing_image_manager.go index d32c24ca5b..14419d26ee 100644 --- a/engineapi/backing_image_manager.go +++ b/engineapi/backing_image_manager.go @@ -54,9 +54,10 @@ func (c *BackingImageManagerClient) parseBackingImageFileInfo(bi *bimapi.Backing return nil } return &longhorn.BackingImageFileInfo{ - Name: bi.Name, - UUID: bi.UUID, - Size: bi.Size, + Name: bi.Name, + UUID: bi.UUID, + Size: bi.Size, + VirtualSize: bi.VirtualSize, State: longhorn.BackingImageState(bi.Status.State), CurrentChecksum: bi.Status.CurrentChecksum, diff --git a/k8s/crds.yaml b/k8s/crds.yaml index 03478c4921..0f6bd558da 100644 --- a/k8s/crds.yaml +++ b/k8s/crds.yaml @@ -314,6 +314,9 @@ spec: type: string uuid: type: string + virtualSize: + format: int64 + type: integer type: object nullable: true type: object @@ -412,6 +415,10 @@ spec: jsonPath: .status.size name: Size type: string + - description: The virtual size of the image (may be larger than file size) + jsonPath: .status.virtualSize + name: VirtualSize + type: string - jsonPath: .metadata.creationTimestamp name: Age type: date @@ -479,6 +486,10 @@ spec: type: integer uuid: type: string + virtualSize: + description: Virtual size of image, which may be larger than physical size. Will be zero until known (e.g. while a backing image is uploading) + format: int64 + type: integer type: object type: object served: true diff --git a/k8s/pkg/apis/longhorn/v1beta2/backingimage.go b/k8s/pkg/apis/longhorn/v1beta2/backingimage.go index 15cf0c12a3..a68fc3e2d4 100644 --- a/k8s/pkg/apis/longhorn/v1beta2/backingimage.go +++ b/k8s/pkg/apis/longhorn/v1beta2/backingimage.go @@ -56,6 +56,9 @@ type BackingImageStatus struct { UUID string `json:"uuid"` // +optional Size int64 `json:"size"` + // Virtual size of image, which may be larger than physical size. Will be zero until known (e.g. while a backing image is uploading) + // +optional + VirtualSize int64 `json:"virtualSize"` // +optional Checksum string `json:"checksum"` // +optional @@ -74,6 +77,7 @@ type BackingImageStatus struct { // +kubebuilder:printcolumn:name="UUID",type=string,JSONPath=`.status.uuid`,description="The system generated UUID" // +kubebuilder:printcolumn:name="SourceType",type=string,JSONPath=`.spec.sourceType`,description="The source of the backing image file data" // +kubebuilder:printcolumn:name="Size",type=string,JSONPath=`.status.size`,description="The backing image file size in each disk" +// +kubebuilder:printcolumn:name="VirtualSize",type=string,JSONPath=`.status.virtualSize`,description="The virtual size of the image (may be larger than file size)" // +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` // BackingImage is where Longhorn stores backing image object. diff --git a/k8s/pkg/apis/longhorn/v1beta2/backingimagemanager.go b/k8s/pkg/apis/longhorn/v1beta2/backingimagemanager.go index a7dfa00073..303b2f81ae 100644 --- a/k8s/pkg/apis/longhorn/v1beta2/backingimagemanager.go +++ b/k8s/pkg/apis/longhorn/v1beta2/backingimagemanager.go @@ -20,6 +20,8 @@ type BackingImageFileInfo struct { // +optional Size int64 `json:"size"` // +optional + VirtualSize int64 `json:"virtualSize"` + // +optional State BackingImageState `json:"state"` // +optional CurrentChecksum string `json:"currentChecksum"` From 9f44a6ffa5bb3bb9297bd651ffb5b0c73433d951 Mon Sep 17 00:00:00 2001 From: Tim Serong Date: Thu, 28 Mar 2024 17:21:27 +1100 Subject: [PATCH 3/3] Set backing image state to failed in case of size or virtualSize mismatch Doing this means if there's somehow a mismatch between backing image size or virtual size reported by backing image manager vs. what's currently in the backing image resource's status, the error will be made visible in status.diskFileStatusMap.$DISKUUID.message, i.e. the user should be able to can see the problem by running `kubectl -n longhorn-system get lhbi -o yaml`. This is the same logic as is already used in updateStatusWithFileInfo(). The one thing I'm struggling with here is how to inject such a failure into a running system in order to prove that this change works correctly. Signed-off-by: Tim Serong (cherry picked from commit 6df051064711a2646c5b28c546d80b7bde83e439) --- controller/backing_image_controller.go | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/controller/backing_image_controller.go b/controller/backing_image_controller.go index 3de5dfb801..1df1c34b79 100644 --- a/controller/backing_image_controller.go +++ b/controller/backing_image_controller.go @@ -663,7 +663,13 @@ func (bic *BackingImageController) syncBackingImageFileInfo(bi *longhorn.Backing bic.eventRecorder.Eventf(bi, corev1.EventTypeNormal, constant.EventReasonUpdate, "Set size to %v", bi.Status.Size) } if bi.Status.Size != info.Size { - return fmt.Errorf("found mismatching size %v reported by backing image manager %v in disk %v, the size recorded in status is %v", info.Size, bim.Name, bim.Spec.DiskUUID, bi.Status.Size) + if bi.Status.DiskFileStatusMap[bim.Spec.DiskUUID].State != longhorn.BackingImageStateFailed { + msg := fmt.Sprintf("found mismatching size %v reported by backing image manager %v in disk %v, the size recorded in status is %v", + info.Size, bim.Name, bim.Spec.DiskUUID, bi.Status.Size) + log.Error(msg) + bi.Status.DiskFileStatusMap[bim.Spec.DiskUUID].State = longhorn.BackingImageStateFailed + bi.Status.DiskFileStatusMap[bim.Spec.DiskUUID].Message = msg + } } } if info.VirtualSize > 0 { @@ -672,8 +678,13 @@ func (bic *BackingImageController) syncBackingImageFileInfo(bi *longhorn.Backing bic.eventRecorder.Eventf(bi, corev1.EventTypeNormal, constant.EventReasonUpdate, "Set virtualSize to %v", bi.Status.VirtualSize) } if bi.Status.VirtualSize != info.VirtualSize { - return fmt.Errorf("found mismatching virtualSize %v reported by backing image manager %v in disk %v, the virtualSize recorded in status is %v", - info.VirtualSize, bim.Name, bim.Spec.DiskUUID, bi.Status.VirtualSize) + if bi.Status.DiskFileStatusMap[bim.Spec.DiskUUID].State != longhorn.BackingImageStateFailed { + msg := fmt.Sprintf("found mismatching virtualSize %v reported by backing image manager %v in disk %v, the virtualSize recorded in status is %v", + info.VirtualSize, bim.Name, bim.Spec.DiskUUID, bi.Status.VirtualSize) + log.Error(msg) + bi.Status.DiskFileStatusMap[bim.Spec.DiskUUID].State = longhorn.BackingImageStateFailed + bi.Status.DiskFileStatusMap[bim.Spec.DiskUUID].Message = msg + } } } }