diff --git a/go.mod b/go.mod index 9e46ad57..bb205805 100644 --- a/go.mod +++ b/go.mod @@ -48,8 +48,8 @@ replace ( require ( github.com/google/fscrypt v0.3.5 - github.com/longhorn/go-common-libs v0.0.0-20241117040506-5685d80d0eea - github.com/longhorn/types v0.0.0-20241117042122-c899b8796df9 + github.com/longhorn/go-common-libs v0.0.0-20241123075700-b6fce15463ce + github.com/longhorn/types v0.0.0-20241123075624-48c550af4eab github.com/mitchellh/go-ps v1.0.0 github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.9.3 diff --git a/go.sum b/go.sum index 950ce075..c64b7325 100644 --- a/go.sum +++ b/go.sum @@ -65,10 +65,10 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/longhorn/go-common-libs v0.0.0-20241117040506-5685d80d0eea h1:IcyghB5j7y/0C1W9ycZAeKvaiNo3zl/znaxb3vbgtzk= -github.com/longhorn/go-common-libs v0.0.0-20241117040506-5685d80d0eea/go.mod h1:OuDYqmZaMe93CdzhRg81VYctDxI4IpuhJVuUg/igqHg= -github.com/longhorn/types v0.0.0-20241117042122-c899b8796df9 h1:JST+sQ9WdKdndq/00nuS0YmcgTkEebVgkDQkv2CZFV0= -github.com/longhorn/types v0.0.0-20241117042122-c899b8796df9/go.mod h1:dIPa2yMBPOa514bn3pohT7kbVAQcZbZSWItpgxunuPs= +github.com/longhorn/go-common-libs v0.0.0-20241123075700-b6fce15463ce h1:6hmmPtH5KRosHGvs3XTXhJ3NLKvrQmgihcBcZyf/KHw= +github.com/longhorn/go-common-libs v0.0.0-20241123075700-b6fce15463ce/go.mod h1:bzIBhK5G4/qrGy6LKu6b2Z1SdzwICqCQoYQXYQI2orQ= +github.com/longhorn/types v0.0.0-20241123075624-48c550af4eab h1:vW/sSHB0U/GPnornD1cdoKSEe9bdBwVKP68cZUs1Xh0= +github.com/longhorn/types v0.0.0-20241123075624-48c550af4eab/go.mod h1:dIPa2yMBPOa514bn3pohT7kbVAQcZbZSWItpgxunuPs= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= diff --git a/vendor/github.com/longhorn/types/pkg/generated/smrpc/smrpc.pb.go b/vendor/github.com/longhorn/types/pkg/generated/smrpc/smrpc.pb.go index 8e67a17c..894496c4 100644 --- a/vendor/github.com/longhorn/types/pkg/generated/smrpc/smrpc.pb.go +++ b/vendor/github.com/longhorn/types/pkg/generated/smrpc/smrpc.pb.go @@ -78,24 +78,28 @@ var file_smrpc_smrpc_proto_rawDesc = []byte{ 0x69, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x32, 0xd1, 0x01, 0x0a, 0x13, 0x53, 0x68, 0x61, 0x72, 0x65, 0x4d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x42, 0x0a, 0x0e, - 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x72, 0x69, 0x6d, 0x12, 0x16, - 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x72, 0x69, 0x6d, 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, 0x3b, 0x0a, 0x07, 0x55, 0x6e, 0x6d, 0x6f, 0x75, 0x6e, 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, 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, 0x39, 0x0a, - 0x05, 0x4d, 0x6f, 0x75, 0x6e, 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, 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, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2f, 0x73, 0x6d, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x76, 0x69, 0x63, 0x65, 0x32, 0x97, 0x02, 0x0a, 0x13, 0x53, 0x68, 0x61, 0x72, 0x65, 0x4d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x10, + 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x69, 0x7a, 0x65, + 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, 0x12, 0x42, 0x0a, 0x0e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x54, 0x72, 0x69, 0x6d, 0x12, 0x16, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x54, 0x72, 0x69, 0x6d, 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, 0x3b, 0x0a, 0x07, 0x55, 0x6e, 0x6d, 0x6f, 0x75, 0x6e, + 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, 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, 0x39, 0x0a, 0x05, 0x4d, 0x6f, 0x75, 0x6e, 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, 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, 0x42, 0x2f, + 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x6f, 0x6e, + 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2f, 0x73, 0x6d, 0x72, 0x70, 0x63, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -116,14 +120,16 @@ var file_smrpc_smrpc_proto_goTypes = []interface{}{ (*emptypb.Empty)(nil), // 1: google.protobuf.Empty } var file_smrpc_smrpc_proto_depIdxs = []int32{ - 0, // 0: ShareManagerService.FilesystemTrim:input_type -> FilesystemTrimRequest - 1, // 1: ShareManagerService.Unmount:input_type -> google.protobuf.Empty - 1, // 2: ShareManagerService.Mount:input_type -> google.protobuf.Empty - 1, // 3: ShareManagerService.FilesystemTrim:output_type -> google.protobuf.Empty - 1, // 4: ShareManagerService.Unmount:output_type -> google.protobuf.Empty - 1, // 5: ShareManagerService.Mount:output_type -> google.protobuf.Empty - 3, // [3:6] is the sub-list for method output_type - 0, // [0:3] is the sub-list for method input_type + 1, // 0: ShareManagerService.FilesystemResize:input_type -> google.protobuf.Empty + 0, // 1: ShareManagerService.FilesystemTrim:input_type -> FilesystemTrimRequest + 1, // 2: ShareManagerService.Unmount:input_type -> google.protobuf.Empty + 1, // 3: ShareManagerService.Mount:input_type -> google.protobuf.Empty + 1, // 4: ShareManagerService.FilesystemResize:output_type -> google.protobuf.Empty + 1, // 5: ShareManagerService.FilesystemTrim:output_type -> google.protobuf.Empty + 1, // 6: ShareManagerService.Unmount:output_type -> google.protobuf.Empty + 1, // 7: ShareManagerService.Mount:output_type -> google.protobuf.Empty + 4, // [4:8] is the sub-list for method output_type + 0, // [0:4] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name diff --git a/vendor/github.com/longhorn/types/pkg/generated/smrpc/smrpc_grpc.pb.go b/vendor/github.com/longhorn/types/pkg/generated/smrpc/smrpc_grpc.pb.go index 26492c8f..c49df1a9 100644 --- a/vendor/github.com/longhorn/types/pkg/generated/smrpc/smrpc_grpc.pb.go +++ b/vendor/github.com/longhorn/types/pkg/generated/smrpc/smrpc_grpc.pb.go @@ -20,15 +20,17 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - ShareManagerService_FilesystemTrim_FullMethodName = "/ShareManagerService/FilesystemTrim" - ShareManagerService_Unmount_FullMethodName = "/ShareManagerService/Unmount" - ShareManagerService_Mount_FullMethodName = "/ShareManagerService/Mount" + ShareManagerService_FilesystemResize_FullMethodName = "/ShareManagerService/FilesystemResize" + ShareManagerService_FilesystemTrim_FullMethodName = "/ShareManagerService/FilesystemTrim" + ShareManagerService_Unmount_FullMethodName = "/ShareManagerService/Unmount" + ShareManagerService_Mount_FullMethodName = "/ShareManagerService/Mount" ) // ShareManagerServiceClient is the client API for ShareManagerService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type ShareManagerServiceClient interface { + FilesystemResize(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) FilesystemTrim(ctx context.Context, in *FilesystemTrimRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) Unmount(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) Mount(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) @@ -42,6 +44,15 @@ func NewShareManagerServiceClient(cc grpc.ClientConnInterface) ShareManagerServi return &shareManagerServiceClient{cc} } +func (c *shareManagerServiceClient) FilesystemResize(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, ShareManagerService_FilesystemResize_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *shareManagerServiceClient) FilesystemTrim(ctx context.Context, in *FilesystemTrimRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, ShareManagerService_FilesystemTrim_FullMethodName, in, out, opts...) @@ -73,6 +84,7 @@ func (c *shareManagerServiceClient) Mount(ctx context.Context, in *emptypb.Empty // All implementations must embed UnimplementedShareManagerServiceServer // for forward compatibility type ShareManagerServiceServer interface { + FilesystemResize(context.Context, *emptypb.Empty) (*emptypb.Empty, error) FilesystemTrim(context.Context, *FilesystemTrimRequest) (*emptypb.Empty, error) Unmount(context.Context, *emptypb.Empty) (*emptypb.Empty, error) Mount(context.Context, *emptypb.Empty) (*emptypb.Empty, error) @@ -83,6 +95,9 @@ type ShareManagerServiceServer interface { type UnimplementedShareManagerServiceServer struct { } +func (UnimplementedShareManagerServiceServer) FilesystemResize(context.Context, *emptypb.Empty) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method FilesystemResize not implemented") +} func (UnimplementedShareManagerServiceServer) FilesystemTrim(context.Context, *FilesystemTrimRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method FilesystemTrim not implemented") } @@ -105,6 +120,24 @@ func RegisterShareManagerServiceServer(s grpc.ServiceRegistrar, srv ShareManager s.RegisterService(&ShareManagerService_ServiceDesc, srv) } +func _ShareManagerService_FilesystemResize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ShareManagerServiceServer).FilesystemResize(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ShareManagerService_FilesystemResize_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ShareManagerServiceServer).FilesystemResize(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + func _ShareManagerService_FilesystemTrim_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(FilesystemTrimRequest) if err := dec(in); err != nil { @@ -166,6 +199,10 @@ var ShareManagerService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ShareManagerService", HandlerType: (*ShareManagerServiceServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "FilesystemResize", + Handler: _ShareManagerService_FilesystemResize_Handler, + }, { MethodName: "FilesystemTrim", Handler: _ShareManagerService_FilesystemTrim_Handler, diff --git a/vendor/modules.txt b/vendor/modules.txt index dd93398b..e0c7a436 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -83,7 +83,7 @@ github.com/josharian/intern # github.com/json-iterator/go v1.1.12 ## explicit; go 1.12 github.com/json-iterator/go -# github.com/longhorn/go-common-libs v0.0.0-20241117040506-5685d80d0eea +# github.com/longhorn/go-common-libs v0.0.0-20241123075700-b6fce15463ce ## explicit; go 1.22.7 github.com/longhorn/go-common-libs/exec github.com/longhorn/go-common-libs/io @@ -94,7 +94,7 @@ github.com/longhorn/go-common-libs/sync github.com/longhorn/go-common-libs/sys github.com/longhorn/go-common-libs/types github.com/longhorn/go-common-libs/utils -# github.com/longhorn/types v0.0.0-20241117042122-c899b8796df9 +# github.com/longhorn/types v0.0.0-20241123075624-48c550af4eab ## explicit; go 1.22.7 github.com/longhorn/types/pkg/generated/smrpc # github.com/mailru/easyjson v0.7.7