From b3f48ccd0cc3abfdebf581661d7b8ecc538a97fa Mon Sep 17 00:00:00 2001 From: Gaziz Nugmanov Date: Tue, 15 Apr 2025 14:23:42 -0700 Subject: [PATCH] SNOW-1991908: test(fdb) add fdbbackup v2 and add proto files --- cmd/sansshell-server/default-policy.rego | 11 + cmd/sansshell-server/main.go | 1 + services/fdb/client/client.go | 379 +++++++++ services/fdb/client/test/fdbbackup_test.go | 132 +++ services/fdb/fdb.pb.go | 900 ++++++++++++++++++--- services/fdb/fdb.proto | 57 ++ services/fdb/fdb_grpc.pb.go | 332 ++++++++ services/fdb/fdb_grpcproxy.pb.go | 492 +++++++++++ services/fdb/server/fdbbackup.go | 222 +++++ services/fdb/server/server_test.go | 3 + services/localfile/localfile.pb.go | 2 +- services/localfile/localfile_grpc.pb.go | 2 +- 12 files changed, 2427 insertions(+), 106 deletions(-) create mode 100644 services/fdb/client/test/fdbbackup_test.go create mode 100644 services/fdb/server/fdbbackup.go diff --git a/cmd/sansshell-server/default-policy.rego b/cmd/sansshell-server/default-policy.rego index d9956f1f..473a679e 100644 --- a/cmd/sansshell-server/default-policy.rego +++ b/cmd/sansshell-server/default-policy.rego @@ -121,3 +121,14 @@ allow { input.message.zero = true input.message.remove = true } + +# Allow fdbbackup commands +allow { + input.type = "Exec.ExecRequest" + input.message.command = "/usr/sbin/fdbbackup" +} + +# Allow all FDBBackup service methods +allow { + startswith(input.method, "/Fdb.FDBBackup/") +} diff --git a/cmd/sansshell-server/main.go b/cmd/sansshell-server/main.go index df8b5285..deb30ebf 100644 --- a/cmd/sansshell-server/main.go +++ b/cmd/sansshell-server/main.go @@ -109,6 +109,7 @@ func init() { *fdbCLIEnvList.Target = append(*fdbCLIEnvList.Target, "") // To set a default flag.Var(&fdbCLIEnvList, "fdbcli-env-list", "List of environment variable names (separated by comma) to retain before fork/exec'ing fdbcli") flag.StringVar(&fdbserver.FDBMoveOrchestrator, "fdb-move-orchestrator", "/usr/bin/fdb_move_orchestrator.py", "Path to python data movement script.") + flag.StringVar(&fdbserver.FDBBackup, "fdbbackup", "/usr/sbin/fdbbackup", "Path to fdbbackup binary.") flag.StringVar(&mtlsFlags.ClientCertFile, "client-cert", mtlsFlags.ClientCertFile, "Path to this client's x509 cert, PEM format") flag.StringVar(&mtlsFlags.ClientKeyFile, "client-key", mtlsFlags.ClientKeyFile, "Path to this client's key") diff --git a/services/fdb/client/client.go b/services/fdb/client/client.go index 14250dd8..f19ff22c 100644 --- a/services/fdb/client/client.go +++ b/services/fdb/client/client.go @@ -102,6 +102,7 @@ func (*fdbCmd) GetSubpackage(f *flag.FlagSet) *subcommands.Commander { c.Register(&fdbConfCmd{}, "") c.Register(&fdbServerCmd{}, "") c.Register(&fdbMoveDataCmd{}, "") + c.Register(&fdbBackupCmd{}, "") return c } @@ -3769,3 +3770,381 @@ func (r *fdbMoveDataWaitCmd) Execute(ctx context.Context, f *flag.FlagSet, args } } } + +const fdbBackupCLIPackage = "fdbbackup" + +func (*fdbBackupCmd) GetSubpackage(f *flag.FlagSet) *subcommands.Commander { + c := client.SetupSubpackage(fdbBackupCLIPackage, f) + c.Register(&fdbBackupStatusCmd{}, "") + c.Register(&fdbBackupAbortCmd{}, "") + c.Register(&fdbBackupStartCmd{}, "") + c.Register(&fdbBackupDescribeCmd{}, "") + c.Register(&fdbBackupExpireCmd{}, "") + c.Register(&fdbBackupPauseCmd{}, "") + c.Register(&fdbBackupResumeCmd{}, "") + return c +} + +type fdbBackupCmd struct{} + +func (*fdbBackupCmd) Name() string { return fdbBackupCLIPackage } +func (*fdbBackupCmd) SetFlags(_ *flag.FlagSet) {} +func (r *fdbBackupCmd) Synopsis() string { + return "Run fdbbackup commands to manage backups.\n" + client.GenerateSynopsis(r.GetSubpackage(flag.NewFlagSet("", flag.ContinueOnError)), 4) +} +func (r *fdbBackupCmd) Usage() string { + return client.GenerateUsage(fdbBackupCLIPackage, r.Synopsis()) +} + +func (r *fdbBackupCmd) Execute(ctx context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus { + c := r.GetSubpackage(f) + return c.Execute(ctx, args...) +} + +type fdbBackupStatusCmd struct { + req *pb.FDBBackupStatusRequest +} + +func (*fdbBackupStatusCmd) Name() string { return "status" } +func (*fdbBackupStatusCmd) Synopsis() string { + return "Get the status of a backup." +} +func (r *fdbBackupStatusCmd) Usage() string { + return "fdbbackup status [--cluster-file ] [--blob_url ]" +} + +func (r *fdbBackupStatusCmd) SetFlags(f *flag.FlagSet) { + r.req = &pb.FDBBackupStatusRequest{} + f.StringVar(&r.req.ClusterFile, "cluster-file", "", "Path to the cluster file.") + f.StringVar(&r.req.BackupUrl, "blob_url", "", "Backup URL.") +} + +func (r *fdbBackupStatusCmd) Execute(ctx context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus { + state := args[0].(*util.ExecuteState) + c := pb.NewFDBBackupClientProxy(state.Conn) + + resp, err := c.FDBBackupStatusOneMany(ctx, r.req) + if err != nil { + for _, e := range state.Err { + fmt.Fprintf(e, "fdbbackup status error: %v\n", err) + } + return subcommands.ExitFailure + } + + retCode := subcommands.ExitSuccess + for r := range resp { + if r.Error != nil { + fmt.Fprintf(state.Err[r.Index], "fdbbackup status error: %v\n", r.Error) + retCode = subcommands.ExitFailure + continue + } + fmt.Fprintf(state.Out[r.Index], "%s", r.Resp.Stdout) + if len(r.Resp.Stderr) > 0 { + fmt.Fprintf(state.Err[r.Index], "%s", r.Resp.Stderr) + } + if r.Resp.RetCode != 0 { + retCode = subcommands.ExitFailure + } + } + + return retCode +} + +type fdbBackupAbortCmd struct { + req *pb.FDBBackupAbortRequest +} + +func (*fdbBackupAbortCmd) Name() string { return "abort" } +func (*fdbBackupAbortCmd) Synopsis() string { + return "Abort a backup." +} +func (r *fdbBackupAbortCmd) Usage() string { + return "fdbbackup abort [--cluster-file ] [--blob_url ]" +} + +func (r *fdbBackupAbortCmd) SetFlags(f *flag.FlagSet) { + r.req = &pb.FDBBackupAbortRequest{} + f.StringVar(&r.req.ClusterFile, "cluster-file", "", "Path to the cluster file.") + f.StringVar(&r.req.BackupUrl, "blob_url", "", "Backup URL.") +} + +func (r *fdbBackupAbortCmd) Execute(ctx context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus { + state := args[0].(*util.ExecuteState) + c := pb.NewFDBBackupClientProxy(state.Conn) + + resp, err := c.FDBBackupAbortOneMany(ctx, r.req) + if err != nil { + for _, e := range state.Err { + fmt.Fprintf(e, "fdbbackup abort error: %v\n", err) + } + return subcommands.ExitFailure + } + + retCode := subcommands.ExitSuccess + for r := range resp { + if r.Error != nil { + fmt.Fprintf(state.Err[r.Index], "fdbbackup abort error: %v\n", r.Error) + retCode = subcommands.ExitFailure + continue + } + fmt.Fprintf(state.Out[r.Index], "%s", r.Resp.Stdout) + if len(r.Resp.Stderr) > 0 { + fmt.Fprintf(state.Err[r.Index], "%s", r.Resp.Stderr) + } + if r.Resp.RetCode != 0 { + retCode = subcommands.ExitFailure + } + } + + return retCode +} + +type fdbBackupStartCmd struct { + req *pb.FDBBackupStartRequest +} + +func (*fdbBackupStartCmd) Name() string { return "start" } +func (*fdbBackupStartCmd) Synopsis() string { + return "Start a backup." +} +func (r *fdbBackupStartCmd) Usage() string { + return "fdbbackup start [--cluster-file ] [--blob_url ] [--snapshot] [--tag ]" +} + +func (r *fdbBackupStartCmd) SetFlags(f *flag.FlagSet) { + r.req = &pb.FDBBackupStartRequest{} + f.StringVar(&r.req.ClusterFile, "cluster-file", "", "Path to the cluster file.") + f.StringVar(&r.req.BackupUrl, "blob_url", "", "Backup URL.") + f.BoolVar(&r.req.Snapshot, "snapshot", false, "Create a snapshot backup.") + f.StringVar(&r.req.Tag, "tag", "", "Tag for the backup.") +} + +func (r *fdbBackupStartCmd) Execute(ctx context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus { + state := args[0].(*util.ExecuteState) + c := pb.NewFDBBackupClientProxy(state.Conn) + + resp, err := c.FDBBackupStartOneMany(ctx, r.req) + if err != nil { + for _, e := range state.Err { + fmt.Fprintf(e, "fdbbackup start error: %v\n", err) + } + return subcommands.ExitFailure + } + + retCode := subcommands.ExitSuccess + for r := range resp { + if r.Error != nil { + fmt.Fprintf(state.Err[r.Index], "fdbbackup start error: %v\n", r.Error) + retCode = subcommands.ExitFailure + continue + } + fmt.Fprintf(state.Out[r.Index], "%s", r.Resp.Stdout) + if len(r.Resp.Stderr) > 0 { + fmt.Fprintf(state.Err[r.Index], "%s", r.Resp.Stderr) + } + if r.Resp.RetCode != 0 { + retCode = subcommands.ExitFailure + } + } + + return retCode +} + +type fdbBackupDescribeCmd struct { + req *pb.FDBBackupDescribeRequest +} + +func (*fdbBackupDescribeCmd) Name() string { return "describe" } +func (*fdbBackupDescribeCmd) Synopsis() string { + return "Describe a backup." +} +func (r *fdbBackupDescribeCmd) Usage() string { + return "fdbbackup describe [--cluster-file ] [--blob_url ]" +} + +func (r *fdbBackupDescribeCmd) SetFlags(f *flag.FlagSet) { + r.req = &pb.FDBBackupDescribeRequest{} + f.StringVar(&r.req.ClusterFile, "cluster-file", "", "Path to the cluster file.") + f.StringVar(&r.req.BackupUrl, "blob_url", "", "Backup URL.") +} + +func (r *fdbBackupDescribeCmd) Execute(ctx context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus { + state := args[0].(*util.ExecuteState) + c := pb.NewFDBBackupClientProxy(state.Conn) + + resp, err := c.FDBBackupDescribeOneMany(ctx, r.req) + if err != nil { + for _, e := range state.Err { + fmt.Fprintf(e, "fdbbackup describe error: %v\n", err) + } + return subcommands.ExitFailure + } + + retCode := subcommands.ExitSuccess + for r := range resp { + if r.Error != nil { + fmt.Fprintf(state.Err[r.Index], "fdbbackup describe error: %v\n", r.Error) + retCode = subcommands.ExitFailure + continue + } + fmt.Fprintf(state.Out[r.Index], "%s", r.Resp.Stdout) + if len(r.Resp.Stderr) > 0 { + fmt.Fprintf(state.Err[r.Index], "%s", r.Resp.Stderr) + } + if r.Resp.RetCode != 0 { + retCode = subcommands.ExitFailure + } + } + + return retCode +} + +type fdbBackupExpireCmd struct { + req *pb.FDBBackupExpireRequest +} + +func (*fdbBackupExpireCmd) Name() string { return "expire" } +func (*fdbBackupExpireCmd) Synopsis() string { + return "Expire backups before a specified version." +} +func (r *fdbBackupExpireCmd) Usage() string { + return "fdbbackup expire [--cluster-file ] [--blob_url ] [--version ]" +} + +func (r *fdbBackupExpireCmd) SetFlags(f *flag.FlagSet) { + r.req = &pb.FDBBackupExpireRequest{} + f.StringVar(&r.req.ClusterFile, "cluster-file", "", "Path to the cluster file.") + f.StringVar(&r.req.BackupUrl, "blob_url", "", "Backup URL.") + f.StringVar(&r.req.Version, "version", "", "Version before which to expire backups.") +} + +func (r *fdbBackupExpireCmd) Execute(ctx context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus { + state := args[0].(*util.ExecuteState) + c := pb.NewFDBBackupClientProxy(state.Conn) + + resp, err := c.FDBBackupExpireOneMany(ctx, r.req) + if err != nil { + for _, e := range state.Err { + fmt.Fprintf(e, "fdbbackup expire error: %v\n", err) + } + return subcommands.ExitFailure + } + + retCode := subcommands.ExitSuccess + for r := range resp { + if r.Error != nil { + fmt.Fprintf(state.Err[r.Index], "fdbbackup expire error: %v\n", r.Error) + retCode = subcommands.ExitFailure + continue + } + fmt.Fprintf(state.Out[r.Index], "%s", r.Resp.Stdout) + if len(r.Resp.Stderr) > 0 { + fmt.Fprintf(state.Err[r.Index], "%s", r.Resp.Stderr) + } + if r.Resp.RetCode != 0 { + retCode = subcommands.ExitFailure + } + } + + return retCode +} + +type fdbBackupPauseCmd struct { + req *pb.FDBBackupPauseRequest +} + +func (*fdbBackupPauseCmd) Name() string { return "pause" } +func (*fdbBackupPauseCmd) Synopsis() string { + return "Pause a backup." +} +func (r *fdbBackupPauseCmd) Usage() string { + return "fdbbackup pause [--cluster-file ] [--blob_url ] [--tag ]" +} + +func (r *fdbBackupPauseCmd) SetFlags(f *flag.FlagSet) { + r.req = &pb.FDBBackupPauseRequest{} + f.StringVar(&r.req.ClusterFile, "cluster-file", "", "Path to the cluster file.") + f.StringVar(&r.req.BackupUrl, "blob_url", "", "Backup URL.") + f.StringVar(&r.req.Tag, "tag", "", "Tag for the backup.") +} + +func (r *fdbBackupPauseCmd) Execute(ctx context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus { + state := args[0].(*util.ExecuteState) + c := pb.NewFDBBackupClientProxy(state.Conn) + + resp, err := c.FDBBackupPauseOneMany(ctx, r.req) + if err != nil { + for _, e := range state.Err { + fmt.Fprintf(e, "fdbbackup pause error: %v\n", err) + } + return subcommands.ExitFailure + } + + retCode := subcommands.ExitSuccess + for r := range resp { + if r.Error != nil { + fmt.Fprintf(state.Err[r.Index], "fdbbackup pause error: %v\n", r.Error) + retCode = subcommands.ExitFailure + continue + } + fmt.Fprintf(state.Out[r.Index], "%s", r.Resp.Stdout) + if len(r.Resp.Stderr) > 0 { + fmt.Fprintf(state.Err[r.Index], "%s", r.Resp.Stderr) + } + if r.Resp.RetCode != 0 { + retCode = subcommands.ExitFailure + } + } + + return retCode +} + +type fdbBackupResumeCmd struct { + req *pb.FDBBackupResumeRequest +} + +func (*fdbBackupResumeCmd) Name() string { return "resume" } +func (*fdbBackupResumeCmd) Synopsis() string { + return "Resume a backup." +} +func (r *fdbBackupResumeCmd) Usage() string { + return "fdbbackup resume [--cluster-file ] [--blob_url ] [--tag ]" +} + +func (r *fdbBackupResumeCmd) SetFlags(f *flag.FlagSet) { + r.req = &pb.FDBBackupResumeRequest{} + f.StringVar(&r.req.ClusterFile, "cluster-file", "", "Path to the cluster file.") + f.StringVar(&r.req.BackupUrl, "blob_url", "", "Backup URL.") + f.StringVar(&r.req.Tag, "tag", "", "Tag for the backup.") +} + +func (r *fdbBackupResumeCmd) Execute(ctx context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus { + state := args[0].(*util.ExecuteState) + c := pb.NewFDBBackupClientProxy(state.Conn) + + resp, err := c.FDBBackupResumeOneMany(ctx, r.req) + if err != nil { + for _, e := range state.Err { + fmt.Fprintf(e, "fdbbackup resume error: %v\n", err) + } + return subcommands.ExitFailure + } + + retCode := subcommands.ExitSuccess + for r := range resp { + if r.Error != nil { + fmt.Fprintf(state.Err[r.Index], "fdbbackup resume error: %v\n", r.Error) + retCode = subcommands.ExitFailure + continue + } + fmt.Fprintf(state.Out[r.Index], "%s", r.Resp.Stdout) + if len(r.Resp.Stderr) > 0 { + fmt.Fprintf(state.Err[r.Index], "%s", r.Resp.Stderr) + } + if r.Resp.RetCode != 0 { + retCode = subcommands.ExitFailure + } + } + + return retCode +} diff --git a/services/fdb/client/test/fdbbackup_test.go b/services/fdb/client/test/fdbbackup_test.go new file mode 100644 index 00000000..f2378579 --- /dev/null +++ b/services/fdb/client/test/fdbbackup_test.go @@ -0,0 +1,132 @@ +/* Copyright (c) 2023 Snowflake Inc. All rights reserved. + Licensed under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +package test + +import ( + "context" + "log" + "net" + "os" + "testing" + + "github.com/Snowflake-Labs/sansshell/services" + pb "github.com/Snowflake-Labs/sansshell/services/fdb" + _ "github.com/Snowflake-Labs/sansshell/services/fdb/server" // Initialize the server to register services + "github.com/Snowflake-Labs/sansshell/testing/testutil" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/test/bufconn" +) + +var ( + bufSize = 1024 * 1024 + lis *bufconn.Listener +) + +func bufDialer(context.Context, string) (net.Conn, error) { + return lis.Dial() +} + +func TestMain(m *testing.M) { + lis = bufconn.Listen(bufSize) + s := grpc.NewServer() + for _, svc := range services.ListServices() { + svc.Register(s) + } + go func() { + if err := s.Serve(lis); err != nil { + log.Fatalf("Server exited with error: %v", err) + } + }() + defer s.GracefulStop() + + os.Exit(m.Run()) +} + +// TestFDBBackupCommands tests the basic functionality of fdbbackup commands +func TestFDBBackupCommands(t *testing.T) { + ctx := context.Background() + + // Create a test connection + conn, err := grpc.DialContext(ctx, "bufnet", grpc.WithContextDialer(bufDialer), grpc.WithTransportCredentials(insecure.NewCredentials())) + if err != nil { + t.Fatal(err) + } + t.Cleanup(func() { conn.Close() }) + + // Get a client + client := pb.NewBackupClient(conn) + + // Test cases + testCases := []struct { + name string + request *pb.FDBBackupRequest + wantErr bool + }{ + { + name: "status", + request: &pb.FDBBackupRequest{ + Commands: []*pb.FDBBackupCommand{ + { + Command: &pb.FDBBackupCommand_Status{ + Status: &pb.FDBBackupStatus{}, + }, + }, + }, + }, + wantErr: false, + }, + { + name: "start backup", + request: &pb.FDBBackupRequest{ + Commands: []*pb.FDBBackupCommand{ + { + Command: &pb.FDBBackupCommand_Start{ + Start: &pb.FDBBackupStart{ + DestinationUrl: "s3://test-bucket", + }, + }, + }, + }, + }, + wantErr: false, + }, + { + name: "abort backup", + request: &pb.FDBBackupRequest{ + Commands: []*pb.FDBBackupCommand{ + { + Command: &pb.FDBBackupCommand_Abort{ + Abort: &pb.FDBBackupAbort{}, + }, + }, + }, + }, + wantErr: false, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + _, err := client.FDBBackup(ctx, tc.request) + if tc.wantErr { + if err == nil { + t.Errorf("Expected error for %s, but got success", tc.name) + } + return + } + testutil.FatalOnErr(tc.name, err, t) + }) + } +} diff --git a/services/fdb/fdb.pb.go b/services/fdb/fdb.pb.go index 88a3c12b..fe96ee99 100644 --- a/services/fdb/fdb.pb.go +++ b/services/fdb/fdb.pb.go @@ -8432,6 +8432,494 @@ func (x *FDBServerResponse) GetRetCode() int32 { return 0 } +type FDBBackupStatusRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterFile string `protobuf:"bytes,1,opt,name=cluster_file,json=clusterFile,proto3" json:"cluster_file,omitempty"` + BackupUrl string `protobuf:"bytes,2,opt,name=backup_url,json=backupUrl,proto3" json:"backup_url,omitempty"` +} + +func (x *FDBBackupStatusRequest) Reset() { + *x = FDBBackupStatusRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_fdb_proto_msgTypes[131] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FDBBackupStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FDBBackupStatusRequest) ProtoMessage() {} + +func (x *FDBBackupStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_fdb_proto_msgTypes[131] + 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) +} + +// Deprecated: Use FDBBackupStatusRequest.ProtoReflect.Descriptor instead. +func (*FDBBackupStatusRequest) Descriptor() ([]byte, []int) { + return file_fdb_proto_rawDescGZIP(), []int{131} +} + +func (x *FDBBackupStatusRequest) GetClusterFile() string { + if x != nil { + return x.ClusterFile + } + return "" +} + +func (x *FDBBackupStatusRequest) GetBackupUrl() string { + if x != nil { + return x.BackupUrl + } + return "" +} + +type FDBBackupAbortRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterFile string `protobuf:"bytes,1,opt,name=cluster_file,json=clusterFile,proto3" json:"cluster_file,omitempty"` + BackupUrl string `protobuf:"bytes,2,opt,name=backup_url,json=backupUrl,proto3" json:"backup_url,omitempty"` +} + +func (x *FDBBackupAbortRequest) Reset() { + *x = FDBBackupAbortRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_fdb_proto_msgTypes[132] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FDBBackupAbortRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FDBBackupAbortRequest) ProtoMessage() {} + +func (x *FDBBackupAbortRequest) ProtoReflect() protoreflect.Message { + mi := &file_fdb_proto_msgTypes[132] + 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) +} + +// Deprecated: Use FDBBackupAbortRequest.ProtoReflect.Descriptor instead. +func (*FDBBackupAbortRequest) Descriptor() ([]byte, []int) { + return file_fdb_proto_rawDescGZIP(), []int{132} +} + +func (x *FDBBackupAbortRequest) GetClusterFile() string { + if x != nil { + return x.ClusterFile + } + return "" +} + +func (x *FDBBackupAbortRequest) GetBackupUrl() string { + if x != nil { + return x.BackupUrl + } + return "" +} + +type FDBBackupStartRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterFile string `protobuf:"bytes,1,opt,name=cluster_file,json=clusterFile,proto3" json:"cluster_file,omitempty"` + BackupUrl string `protobuf:"bytes,2,opt,name=backup_url,json=backupUrl,proto3" json:"backup_url,omitempty"` + Snapshot bool `protobuf:"varint,3,opt,name=snapshot,proto3" json:"snapshot,omitempty"` + Tag string `protobuf:"bytes,4,opt,name=tag,proto3" json:"tag,omitempty"` +} + +func (x *FDBBackupStartRequest) Reset() { + *x = FDBBackupStartRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_fdb_proto_msgTypes[133] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FDBBackupStartRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FDBBackupStartRequest) ProtoMessage() {} + +func (x *FDBBackupStartRequest) ProtoReflect() protoreflect.Message { + mi := &file_fdb_proto_msgTypes[133] + 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) +} + +// Deprecated: Use FDBBackupStartRequest.ProtoReflect.Descriptor instead. +func (*FDBBackupStartRequest) Descriptor() ([]byte, []int) { + return file_fdb_proto_rawDescGZIP(), []int{133} +} + +func (x *FDBBackupStartRequest) GetClusterFile() string { + if x != nil { + return x.ClusterFile + } + return "" +} + +func (x *FDBBackupStartRequest) GetBackupUrl() string { + if x != nil { + return x.BackupUrl + } + return "" +} + +func (x *FDBBackupStartRequest) GetSnapshot() bool { + if x != nil { + return x.Snapshot + } + return false +} + +func (x *FDBBackupStartRequest) GetTag() string { + if x != nil { + return x.Tag + } + return "" +} + +type FDBBackupDescribeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterFile string `protobuf:"bytes,1,opt,name=cluster_file,json=clusterFile,proto3" json:"cluster_file,omitempty"` + BackupUrl string `protobuf:"bytes,2,opt,name=backup_url,json=backupUrl,proto3" json:"backup_url,omitempty"` +} + +func (x *FDBBackupDescribeRequest) Reset() { + *x = FDBBackupDescribeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_fdb_proto_msgTypes[134] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FDBBackupDescribeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FDBBackupDescribeRequest) ProtoMessage() {} + +func (x *FDBBackupDescribeRequest) ProtoReflect() protoreflect.Message { + mi := &file_fdb_proto_msgTypes[134] + 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) +} + +// Deprecated: Use FDBBackupDescribeRequest.ProtoReflect.Descriptor instead. +func (*FDBBackupDescribeRequest) Descriptor() ([]byte, []int) { + return file_fdb_proto_rawDescGZIP(), []int{134} +} + +func (x *FDBBackupDescribeRequest) GetClusterFile() string { + if x != nil { + return x.ClusterFile + } + return "" +} + +func (x *FDBBackupDescribeRequest) GetBackupUrl() string { + if x != nil { + return x.BackupUrl + } + return "" +} + +type FDBBackupExpireRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterFile string `protobuf:"bytes,1,opt,name=cluster_file,json=clusterFile,proto3" json:"cluster_file,omitempty"` + BackupUrl string `protobuf:"bytes,2,opt,name=backup_url,json=backupUrl,proto3" json:"backup_url,omitempty"` + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` +} + +func (x *FDBBackupExpireRequest) Reset() { + *x = FDBBackupExpireRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_fdb_proto_msgTypes[135] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FDBBackupExpireRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FDBBackupExpireRequest) ProtoMessage() {} + +func (x *FDBBackupExpireRequest) ProtoReflect() protoreflect.Message { + mi := &file_fdb_proto_msgTypes[135] + 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) +} + +// Deprecated: Use FDBBackupExpireRequest.ProtoReflect.Descriptor instead. +func (*FDBBackupExpireRequest) Descriptor() ([]byte, []int) { + return file_fdb_proto_rawDescGZIP(), []int{135} +} + +func (x *FDBBackupExpireRequest) GetClusterFile() string { + if x != nil { + return x.ClusterFile + } + return "" +} + +func (x *FDBBackupExpireRequest) GetBackupUrl() string { + if x != nil { + return x.BackupUrl + } + return "" +} + +func (x *FDBBackupExpireRequest) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +type FDBBackupPauseRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterFile string `protobuf:"bytes,1,opt,name=cluster_file,json=clusterFile,proto3" json:"cluster_file,omitempty"` + BackupUrl string `protobuf:"bytes,2,opt,name=backup_url,json=backupUrl,proto3" json:"backup_url,omitempty"` + Tag string `protobuf:"bytes,3,opt,name=tag,proto3" json:"tag,omitempty"` +} + +func (x *FDBBackupPauseRequest) Reset() { + *x = FDBBackupPauseRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_fdb_proto_msgTypes[136] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FDBBackupPauseRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FDBBackupPauseRequest) ProtoMessage() {} + +func (x *FDBBackupPauseRequest) ProtoReflect() protoreflect.Message { + mi := &file_fdb_proto_msgTypes[136] + 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) +} + +// Deprecated: Use FDBBackupPauseRequest.ProtoReflect.Descriptor instead. +func (*FDBBackupPauseRequest) Descriptor() ([]byte, []int) { + return file_fdb_proto_rawDescGZIP(), []int{136} +} + +func (x *FDBBackupPauseRequest) GetClusterFile() string { + if x != nil { + return x.ClusterFile + } + return "" +} + +func (x *FDBBackupPauseRequest) GetBackupUrl() string { + if x != nil { + return x.BackupUrl + } + return "" +} + +func (x *FDBBackupPauseRequest) GetTag() string { + if x != nil { + return x.Tag + } + return "" +} + +type FDBBackupResumeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterFile string `protobuf:"bytes,1,opt,name=cluster_file,json=clusterFile,proto3" json:"cluster_file,omitempty"` + BackupUrl string `protobuf:"bytes,2,opt,name=backup_url,json=backupUrl,proto3" json:"backup_url,omitempty"` + Tag string `protobuf:"bytes,3,opt,name=tag,proto3" json:"tag,omitempty"` +} + +func (x *FDBBackupResumeRequest) Reset() { + *x = FDBBackupResumeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_fdb_proto_msgTypes[137] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FDBBackupResumeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FDBBackupResumeRequest) ProtoMessage() {} + +func (x *FDBBackupResumeRequest) ProtoReflect() protoreflect.Message { + mi := &file_fdb_proto_msgTypes[137] + 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) +} + +// Deprecated: Use FDBBackupResumeRequest.ProtoReflect.Descriptor instead. +func (*FDBBackupResumeRequest) Descriptor() ([]byte, []int) { + return file_fdb_proto_rawDescGZIP(), []int{137} +} + +func (x *FDBBackupResumeRequest) GetClusterFile() string { + if x != nil { + return x.ClusterFile + } + return "" +} + +func (x *FDBBackupResumeRequest) GetBackupUrl() string { + if x != nil { + return x.BackupUrl + } + return "" +} + +func (x *FDBBackupResumeRequest) GetTag() string { + if x != nil { + return x.Tag + } + return "" +} + +type FDBBackupResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Stdout []byte `protobuf:"bytes,1,opt,name=stdout,proto3" json:"stdout,omitempty"` + Stderr []byte `protobuf:"bytes,2,opt,name=stderr,proto3" json:"stderr,omitempty"` + RetCode int32 `protobuf:"varint,3,opt,name=retCode,proto3" json:"retCode,omitempty"` +} + +func (x *FDBBackupResponse) Reset() { + *x = FDBBackupResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_fdb_proto_msgTypes[138] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FDBBackupResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FDBBackupResponse) ProtoMessage() {} + +func (x *FDBBackupResponse) ProtoReflect() protoreflect.Message { + mi := &file_fdb_proto_msgTypes[138] + 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) +} + +// Deprecated: Use FDBBackupResponse.ProtoReflect.Descriptor instead. +func (*FDBBackupResponse) Descriptor() ([]byte, []int) { + return file_fdb_proto_rawDescGZIP(), []int{138} +} + +func (x *FDBBackupResponse) GetStdout() []byte { + if x != nil { + return x.Stdout + } + return nil +} + +func (x *FDBBackupResponse) GetStderr() []byte { + if x != nil { + return x.Stderr + } + return nil +} + +func (x *FDBBackupResponse) GetRetCode() int32 { + if x != nil { + return x.RetCode + } + return 0 +} + var File_fdb_proto protoreflect.FileDescriptor var file_fdb_proto_rawDesc = []byte{ @@ -9442,40 +9930,126 @@ var file_fdb_proto_rawDesc = []byte{ 0x06, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x07, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x32, 0xa6, 0x01, 0x0a, 0x04, 0x43, 0x6f, - 0x6e, 0x66, 0x12, 0x30, 0x0a, 0x04, 0x52, 0x65, 0x61, 0x64, 0x12, 0x10, 0x2e, 0x46, 0x64, 0x62, - 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x46, - 0x64, 0x62, 0x2e, 0x46, 0x64, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x34, 0x0a, 0x05, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x11, 0x2e, - 0x46, 0x64, 0x62, 0x2e, 0x57, 0x72, 0x69, 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, 0x36, 0x0a, 0x06, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x12, 0x12, 0x2e, 0x46, 0x64, 0x62, 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, 0x32, 0xa7, 0x01, 0x0a, 0x07, 0x46, 0x44, 0x42, 0x4d, 0x6f, 0x76, 0x65, 0x12, 0x4c, - 0x0a, 0x0f, 0x46, 0x44, 0x42, 0x4d, 0x6f, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x70, - 0x79, 0x12, 0x1b, 0x2e, 0x46, 0x64, 0x62, 0x2e, 0x46, 0x44, 0x42, 0x4d, 0x6f, 0x76, 0x65, 0x44, - 0x61, 0x74, 0x61, 0x43, 0x6f, 0x70, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, + 0x52, 0x07, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x5a, 0x0a, 0x16, 0x46, 0x44, 0x42, + 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x66, + 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, + 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, 0x63, 0x6b, + 0x75, 0x70, 0x55, 0x72, 0x6c, 0x22, 0x59, 0x0a, 0x15, 0x46, 0x44, 0x42, 0x42, 0x61, 0x63, 0x6b, + 0x75, 0x70, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, + 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x46, 0x69, 0x6c, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x75, 0x72, 0x6c, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x55, 0x72, 0x6c, + 0x22, 0x87, 0x01, 0x0a, 0x15, 0x46, 0x44, 0x42, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, + 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, + 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0x5c, 0x0a, 0x18, 0x46, 0x44, + 0x42, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, + 0x61, 0x63, 0x6b, 0x75, 0x70, 0x55, 0x72, 0x6c, 0x22, 0x74, 0x0a, 0x16, 0x46, 0x44, 0x42, 0x42, + 0x61, 0x63, 0x6b, 0x75, 0x70, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x66, 0x69, + 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, + 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, 0x63, 0x6b, 0x75, + 0x70, 0x55, 0x72, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x6b, + 0x0a, 0x15, 0x46, 0x44, 0x42, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x61, 0x75, 0x73, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, + 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x55, 0x72, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0x6c, 0x0a, 0x16, 0x46, + 0x44, 0x42, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x63, 0x6b, + 0x75, 0x70, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, + 0x63, 0x6b, 0x75, 0x70, 0x55, 0x72, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0x5d, 0x0a, 0x11, 0x46, 0x44, 0x42, + 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, + 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x12, 0x18, + 0x0a, 0x07, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x07, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x32, 0xa6, 0x01, 0x0a, 0x04, 0x43, 0x6f, 0x6e, + 0x66, 0x12, 0x30, 0x0a, 0x04, 0x52, 0x65, 0x61, 0x64, 0x12, 0x10, 0x2e, 0x46, 0x64, 0x62, 0x2e, + 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x46, 0x64, + 0x62, 0x2e, 0x46, 0x64, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x34, 0x0a, 0x05, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x11, 0x2e, 0x46, + 0x64, 0x62, 0x2e, 0x57, 0x72, 0x69, 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, 0x36, 0x0a, 0x06, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x12, 0x12, 0x2e, 0x46, 0x64, 0x62, 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, 0x32, 0xa7, 0x01, 0x0a, 0x07, 0x46, 0x44, 0x42, 0x4d, 0x6f, 0x76, 0x65, 0x12, 0x4c, 0x0a, + 0x0f, 0x46, 0x44, 0x42, 0x4d, 0x6f, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x70, 0x79, + 0x12, 0x1b, 0x2e, 0x46, 0x64, 0x62, 0x2e, 0x46, 0x44, 0x42, 0x4d, 0x6f, 0x76, 0x65, 0x44, 0x61, + 0x74, 0x61, 0x43, 0x6f, 0x70, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, + 0x46, 0x64, 0x62, 0x2e, 0x46, 0x44, 0x42, 0x4d, 0x6f, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x43, + 0x6f, 0x70, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0f, 0x46, + 0x44, 0x42, 0x4d, 0x6f, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x57, 0x61, 0x69, 0x74, 0x12, 0x1b, 0x2e, 0x46, 0x64, 0x62, 0x2e, 0x46, 0x44, 0x42, 0x4d, 0x6f, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, - 0x43, 0x6f, 0x70, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0f, - 0x46, 0x44, 0x42, 0x4d, 0x6f, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x57, 0x61, 0x69, 0x74, 0x12, - 0x1b, 0x2e, 0x46, 0x64, 0x62, 0x2e, 0x46, 0x44, 0x42, 0x4d, 0x6f, 0x76, 0x65, 0x44, 0x61, 0x74, - 0x61, 0x57, 0x61, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x46, - 0x64, 0x62, 0x2e, 0x46, 0x44, 0x42, 0x4d, 0x6f, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x57, 0x61, - 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x32, 0x3c, 0x0a, 0x03, - 0x43, 0x4c, 0x49, 0x12, 0x35, 0x0a, 0x06, 0x46, 0x44, 0x42, 0x43, 0x4c, 0x49, 0x12, 0x12, 0x2e, - 0x46, 0x64, 0x62, 0x2e, 0x46, 0x44, 0x42, 0x43, 0x4c, 0x49, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x13, 0x2e, 0x46, 0x64, 0x62, 0x2e, 0x46, 0x44, 0x42, 0x43, 0x4c, 0x49, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x32, 0x46, 0x0a, 0x06, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x09, 0x46, 0x44, 0x42, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x12, 0x15, 0x2e, 0x46, 0x64, 0x62, 0x2e, 0x46, 0x44, 0x42, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x46, 0x64, 0x62, 0x2e, 0x46, - 0x44, 0x42, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x53, 0x6e, 0x6f, 0x77, 0x66, 0x6c, 0x61, 0x6b, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, - 0x73, 0x61, 0x6e, 0x73, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x2f, 0x66, 0x64, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x57, 0x61, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x46, 0x64, + 0x62, 0x2e, 0x46, 0x44, 0x42, 0x4d, 0x6f, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x57, 0x61, 0x69, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x32, 0x3c, 0x0a, 0x03, 0x43, + 0x4c, 0x49, 0x12, 0x35, 0x0a, 0x06, 0x46, 0x44, 0x42, 0x43, 0x4c, 0x49, 0x12, 0x12, 0x2e, 0x46, + 0x64, 0x62, 0x2e, 0x46, 0x44, 0x42, 0x43, 0x4c, 0x49, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x13, 0x2e, 0x46, 0x64, 0x62, 0x2e, 0x46, 0x44, 0x42, 0x43, 0x4c, 0x49, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x32, 0x46, 0x0a, 0x06, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x09, 0x46, 0x44, 0x42, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x12, 0x15, 0x2e, 0x46, 0x64, 0x62, 0x2e, 0x46, 0x44, 0x42, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x46, 0x64, 0x62, 0x2e, 0x46, 0x44, + 0x42, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x32, 0x8f, 0x04, 0x0a, 0x09, 0x46, 0x44, 0x42, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, + 0x48, 0x0a, 0x0f, 0x46, 0x44, 0x42, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x1b, 0x2e, 0x46, 0x64, 0x62, 0x2e, 0x46, 0x44, 0x42, 0x42, 0x61, 0x63, 0x6b, + 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x16, 0x2e, 0x46, 0x64, 0x62, 0x2e, 0x46, 0x44, 0x42, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0e, 0x46, 0x44, 0x42, + 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x2e, 0x46, 0x64, + 0x62, 0x2e, 0x46, 0x44, 0x42, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x62, 0x6f, 0x72, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x46, 0x64, 0x62, 0x2e, 0x46, 0x44, + 0x42, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x46, 0x0a, 0x0e, 0x46, 0x44, 0x42, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x12, 0x1a, 0x2e, 0x46, 0x64, 0x62, 0x2e, 0x46, 0x44, 0x42, 0x42, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x16, 0x2e, 0x46, 0x64, 0x62, 0x2e, 0x46, 0x44, 0x42, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x11, 0x46, 0x44, 0x42, + 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1d, + 0x2e, 0x46, 0x64, 0x62, 0x2e, 0x46, 0x44, 0x42, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x44, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x46, 0x64, 0x62, 0x2e, 0x46, 0x44, 0x42, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0f, 0x46, 0x44, 0x42, 0x42, 0x61, + 0x63, 0x6b, 0x75, 0x70, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x12, 0x1b, 0x2e, 0x46, 0x64, 0x62, + 0x2e, 0x46, 0x44, 0x42, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x46, 0x64, 0x62, 0x2e, 0x46, 0x44, + 0x42, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x46, 0x0a, 0x0e, 0x46, 0x44, 0x42, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x61, + 0x75, 0x73, 0x65, 0x12, 0x1a, 0x2e, 0x46, 0x64, 0x62, 0x2e, 0x46, 0x44, 0x42, 0x42, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x50, 0x61, 0x75, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x16, 0x2e, 0x46, 0x64, 0x62, 0x2e, 0x46, 0x44, 0x42, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0f, 0x46, 0x44, 0x42, + 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x12, 0x1b, 0x2e, 0x46, + 0x64, 0x62, 0x2e, 0x46, 0x44, 0x42, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x75, + 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x46, 0x64, 0x62, 0x2e, + 0x46, 0x44, 0x42, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x53, 0x6e, 0x6f, 0x77, 0x66, 0x6c, 0x61, 0x6b, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, + 0x2f, 0x73, 0x61, 0x6e, 0x73, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2f, 0x66, 0x64, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -9490,7 +10064,7 @@ func file_fdb_proto_rawDescGZIP() []byte { return file_fdb_proto_rawDescData } -var file_fdb_proto_msgTypes = make([]protoimpl.MessageInfo, 131) +var file_fdb_proto_msgTypes = make([]protoimpl.MessageInfo, 139) var file_fdb_proto_goTypes = []any{ (*Location)(nil), // 0: Fdb.Location (*ReadRequest)(nil), // 1: Fdb.ReadRequest @@ -9623,12 +10197,20 @@ var file_fdb_proto_goTypes = []any{ (*FDBServerVersion)(nil), // 128: Fdb.FDBServerVersion (*FDBServerUnknownAction)(nil), // 129: Fdb.FDBServerUnknownAction (*FDBServerResponse)(nil), // 130: Fdb.FDBServerResponse - (*wrapperspb.StringValue)(nil), // 131: google.protobuf.StringValue - (*wrapperspb.UInt32Value)(nil), // 132: google.protobuf.UInt32Value - (*wrapperspb.BoolValue)(nil), // 133: google.protobuf.BoolValue - (*durationpb.Duration)(nil), // 134: google.protobuf.Duration - (*wrapperspb.Int32Value)(nil), // 135: google.protobuf.Int32Value - (*emptypb.Empty)(nil), // 136: google.protobuf.Empty + (*FDBBackupStatusRequest)(nil), // 131: Fdb.FDBBackupStatusRequest + (*FDBBackupAbortRequest)(nil), // 132: Fdb.FDBBackupAbortRequest + (*FDBBackupStartRequest)(nil), // 133: Fdb.FDBBackupStartRequest + (*FDBBackupDescribeRequest)(nil), // 134: Fdb.FDBBackupDescribeRequest + (*FDBBackupExpireRequest)(nil), // 135: Fdb.FDBBackupExpireRequest + (*FDBBackupPauseRequest)(nil), // 136: Fdb.FDBBackupPauseRequest + (*FDBBackupResumeRequest)(nil), // 137: Fdb.FDBBackupResumeRequest + (*FDBBackupResponse)(nil), // 138: Fdb.FDBBackupResponse + (*wrapperspb.StringValue)(nil), // 139: google.protobuf.StringValue + (*wrapperspb.UInt32Value)(nil), // 140: google.protobuf.UInt32Value + (*wrapperspb.BoolValue)(nil), // 141: google.protobuf.BoolValue + (*durationpb.Duration)(nil), // 142: google.protobuf.Duration + (*wrapperspb.Int32Value)(nil), // 143: google.protobuf.Int32Value + (*emptypb.Empty)(nil), // 144: google.protobuf.Empty } var file_fdb_proto_depIdxs = []int32{ 0, // 0: Fdb.ReadRequest.location:type_name -> Fdb.Location @@ -9647,52 +10229,52 @@ var file_fdb_proto_depIdxs = []int32{ 20, // 13: Fdb.FDBCLIChangefeed.destroy:type_name -> Fdb.FDBCLIChangefeedDestroy 24, // 14: Fdb.FDBCLIChangefeed.stream:type_name -> Fdb.FDBCLIChangefeedStream 25, // 15: Fdb.FDBCLIChangefeed.pop:type_name -> Fdb.FDBCLIChangefeedStreamPop - 131, // 16: Fdb.FDBCLIConfigure.new_or_tss:type_name -> google.protobuf.StringValue - 131, // 17: Fdb.FDBCLIConfigure.redundancy_mode:type_name -> google.protobuf.StringValue - 131, // 18: Fdb.FDBCLIConfigure.storage_engine:type_name -> google.protobuf.StringValue - 132, // 19: Fdb.FDBCLIConfigure.grv_proxies:type_name -> google.protobuf.UInt32Value - 132, // 20: Fdb.FDBCLIConfigure.commit_proxies:type_name -> google.protobuf.UInt32Value - 132, // 21: Fdb.FDBCLIConfigure.resolvers:type_name -> google.protobuf.UInt32Value - 132, // 22: Fdb.FDBCLIConfigure.logs:type_name -> google.protobuf.UInt32Value - 132, // 23: Fdb.FDBCLIConfigure.count:type_name -> google.protobuf.UInt32Value - 132, // 24: Fdb.FDBCLIConfigure.perpetual_storage_wiggle:type_name -> google.protobuf.UInt32Value - 131, // 25: Fdb.FDBCLIConfigure.perpetual_storage_wiggle_locality:type_name -> google.protobuf.StringValue - 131, // 26: Fdb.FDBCLIConfigure.storage_migration_type:type_name -> google.protobuf.StringValue - 131, // 27: Fdb.FDBCLIConfigure.tenant_mode:type_name -> google.protobuf.StringValue - 132, // 28: Fdb.FDBCLIConfigure.blob_granules_enabled:type_name -> google.protobuf.UInt32Value - 133, // 29: Fdb.FDBCLIConsistencycheck.mode:type_name -> google.protobuf.BoolValue + 139, // 16: Fdb.FDBCLIConfigure.new_or_tss:type_name -> google.protobuf.StringValue + 139, // 17: Fdb.FDBCLIConfigure.redundancy_mode:type_name -> google.protobuf.StringValue + 139, // 18: Fdb.FDBCLIConfigure.storage_engine:type_name -> google.protobuf.StringValue + 140, // 19: Fdb.FDBCLIConfigure.grv_proxies:type_name -> google.protobuf.UInt32Value + 140, // 20: Fdb.FDBCLIConfigure.commit_proxies:type_name -> google.protobuf.UInt32Value + 140, // 21: Fdb.FDBCLIConfigure.resolvers:type_name -> google.protobuf.UInt32Value + 140, // 22: Fdb.FDBCLIConfigure.logs:type_name -> google.protobuf.UInt32Value + 140, // 23: Fdb.FDBCLIConfigure.count:type_name -> google.protobuf.UInt32Value + 140, // 24: Fdb.FDBCLIConfigure.perpetual_storage_wiggle:type_name -> google.protobuf.UInt32Value + 139, // 25: Fdb.FDBCLIConfigure.perpetual_storage_wiggle_locality:type_name -> google.protobuf.StringValue + 139, // 26: Fdb.FDBCLIConfigure.storage_migration_type:type_name -> google.protobuf.StringValue + 139, // 27: Fdb.FDBCLIConfigure.tenant_mode:type_name -> google.protobuf.StringValue + 140, // 28: Fdb.FDBCLIConfigure.blob_granules_enabled:type_name -> google.protobuf.UInt32Value + 141, // 29: Fdb.FDBCLIConsistencycheck.mode:type_name -> google.protobuf.BoolValue 32, // 30: Fdb.FDBCLICoordinators.auto:type_name -> Fdb.FDBCLICoordinatorsAuto 33, // 31: Fdb.FDBCLICoordinators.addresses:type_name -> Fdb.FDBCLICoordinatorsAddresses - 131, // 32: Fdb.FDBCLICoordinators.description:type_name -> google.protobuf.StringValue + 139, // 32: Fdb.FDBCLICoordinators.description:type_name -> google.protobuf.StringValue 36, // 33: Fdb.FDBCLIDatadistribution.on:type_name -> Fdb.FDBCLIDatadistributionOn 37, // 34: Fdb.FDBCLIDatadistribution.off:type_name -> Fdb.FDBCLIDatadistributionOff 38, // 35: Fdb.FDBCLIDatadistribution.enable:type_name -> Fdb.FDBCLIDatadistributionEnable 39, // 36: Fdb.FDBCLIDatadistribution.disable:type_name -> Fdb.FDBCLIDatadistributionDisable - 133, // 37: Fdb.FDBCLIExclude.failed:type_name -> google.protobuf.BoolValue - 133, // 38: Fdb.FDBCLIExclude.no_wait:type_name -> google.protobuf.BoolValue + 141, // 37: Fdb.FDBCLIExclude.failed:type_name -> google.protobuf.BoolValue + 141, // 38: Fdb.FDBCLIExclude.no_wait:type_name -> google.protobuf.BoolValue 44, // 39: Fdb.FDBCLIExpensiveDataCheck.init:type_name -> Fdb.FDBCLIExpensiveDataCheckInit 45, // 40: Fdb.FDBCLIExpensiveDataCheck.list:type_name -> Fdb.FDBCLIExpensiveDataCheckList 46, // 41: Fdb.FDBCLIExpensiveDataCheck.all:type_name -> Fdb.FDBCLIExpensiveDataCheckAll 47, // 42: Fdb.FDBCLIExpensiveDataCheck.check:type_name -> Fdb.FDBCLIExpensiveDataCheckCheck - 133, // 43: Fdb.FDBCLIFileconfigure.new:type_name -> google.protobuf.BoolValue - 131, // 44: Fdb.FDBCLIGetrange.end_key:type_name -> google.protobuf.StringValue - 132, // 45: Fdb.FDBCLIGetrange.limit:type_name -> google.protobuf.UInt32Value - 131, // 46: Fdb.FDBCLIGetrangekeys.end_key:type_name -> google.protobuf.StringValue - 132, // 47: Fdb.FDBCLIGetrangekeys.limit:type_name -> google.protobuf.UInt32Value - 133, // 48: Fdb.FDBCLIInclude.failed:type_name -> google.protobuf.BoolValue + 141, // 43: Fdb.FDBCLIFileconfigure.new:type_name -> google.protobuf.BoolValue + 139, // 44: Fdb.FDBCLIGetrange.end_key:type_name -> google.protobuf.StringValue + 140, // 45: Fdb.FDBCLIGetrange.limit:type_name -> google.protobuf.UInt32Value + 139, // 46: Fdb.FDBCLIGetrangekeys.end_key:type_name -> google.protobuf.StringValue + 140, // 47: Fdb.FDBCLIGetrangekeys.limit:type_name -> google.protobuf.UInt32Value + 141, // 48: Fdb.FDBCLIInclude.failed:type_name -> google.protobuf.BoolValue 57, // 49: Fdb.FDBCLIInclude.addresses:type_name -> Fdb.FDBCLIIncludeAddresses 59, // 50: Fdb.FDBCLIKill.init:type_name -> Fdb.FDBCLIKillInit 60, // 51: Fdb.FDBCLIKill.list:type_name -> Fdb.FDBCLIKillList 61, // 52: Fdb.FDBCLIKill.all:type_name -> Fdb.FDBCLIKillAll 62, // 53: Fdb.FDBCLIKill.targets:type_name -> Fdb.FDBCLIKillTargets - 134, // 54: Fdb.FDBCLIKill.sleep:type_name -> google.protobuf.Duration - 131, // 55: Fdb.FDBCLIListtenants.begin:type_name -> google.protobuf.StringValue - 131, // 56: Fdb.FDBCLIListtenants.end:type_name -> google.protobuf.StringValue - 132, // 57: Fdb.FDBCLIListtenants.limit:type_name -> google.protobuf.UInt32Value + 142, // 54: Fdb.FDBCLIKill.sleep:type_name -> google.protobuf.Duration + 139, // 55: Fdb.FDBCLIListtenants.begin:type_name -> google.protobuf.StringValue + 139, // 56: Fdb.FDBCLIListtenants.end:type_name -> google.protobuf.StringValue + 140, // 57: Fdb.FDBCLIListtenants.limit:type_name -> google.protobuf.UInt32Value 66, // 58: Fdb.FDBCLIMaintenance.status:type_name -> Fdb.FDBCLIMaintenanceStatus 67, // 59: Fdb.FDBCLIMaintenance.on:type_name -> Fdb.FDBCLIMaintenanceOn 68, // 60: Fdb.FDBCLIMaintenance.off:type_name -> Fdb.FDBCLIMaintenanceOff - 131, // 61: Fdb.FDBCLIOptionArg.arg:type_name -> google.protobuf.StringValue + 139, // 61: Fdb.FDBCLIOptionArg.arg:type_name -> google.protobuf.StringValue 70, // 62: Fdb.FDBCLIOption.blank:type_name -> Fdb.FDBCLIOptionBlank 71, // 63: Fdb.FDBCLIOption.arg:type_name -> Fdb.FDBCLIOptionArg 73, // 64: Fdb.FDBCLIProfileActionClientSet.default_rate:type_name -> Fdb.FDBCLIProfileActionClientDefault @@ -9705,7 +10287,7 @@ var file_fdb_proto_depIdxs = []int32{ 79, // 71: Fdb.FDBCLIProfile.heap:type_name -> Fdb.FDBCLIProfileActionHeap 83, // 72: Fdb.FDBCLISetclass.list:type_name -> Fdb.FDBCLISetclassList 82, // 73: Fdb.FDBCLISetclass.arg:type_name -> Fdb.FDBCLISetclassArg - 131, // 74: Fdb.FDBCLIStatus.style:type_name -> google.protobuf.StringValue + 139, // 74: Fdb.FDBCLIStatus.style:type_name -> google.protobuf.StringValue 88, // 75: Fdb.FDBCLISuspend.init:type_name -> Fdb.FDBCLISuspendInit 89, // 76: Fdb.FDBCLISuspend.suspend:type_name -> Fdb.FDBCLISuspendSuspend 91, // 77: Fdb.FDBCLITenantEmergencyMove.start:type_name -> Fdb.FDBCLITenantEmergencyMoveStart @@ -9713,14 +10295,14 @@ var file_fdb_proto_depIdxs = []int32{ 93, // 79: Fdb.FDBCLITenantEmergencyMove.finish:type_name -> Fdb.FDBCLITenantEmergencyMoveFinish 94, // 80: Fdb.FDBCLITenantEmergencyMove.abort:type_name -> Fdb.FDBCLITenantEmergencyMoveAbort 95, // 81: Fdb.FDBCLITenantEmergencyMove.status:type_name -> Fdb.FDBCLITenantEmergencyMoveStatus - 132, // 82: Fdb.FDBCLIThrottleActionOn.rate:type_name -> google.protobuf.UInt32Value - 131, // 83: Fdb.FDBCLIThrottleActionOn.duration:type_name -> google.protobuf.StringValue - 131, // 84: Fdb.FDBCLIThrottleActionOn.priority:type_name -> google.protobuf.StringValue - 131, // 85: Fdb.FDBCLIThrottleActionOff.type:type_name -> google.protobuf.StringValue - 131, // 86: Fdb.FDBCLIThrottleActionOff.tag:type_name -> google.protobuf.StringValue - 131, // 87: Fdb.FDBCLIThrottleActionOff.priority:type_name -> google.protobuf.StringValue - 131, // 88: Fdb.FDBCLIThrottleActionList.type:type_name -> google.protobuf.StringValue - 132, // 89: Fdb.FDBCLIThrottleActionList.limit:type_name -> google.protobuf.UInt32Value + 140, // 82: Fdb.FDBCLIThrottleActionOn.rate:type_name -> google.protobuf.UInt32Value + 139, // 83: Fdb.FDBCLIThrottleActionOn.duration:type_name -> google.protobuf.StringValue + 139, // 84: Fdb.FDBCLIThrottleActionOn.priority:type_name -> google.protobuf.StringValue + 139, // 85: Fdb.FDBCLIThrottleActionOff.type:type_name -> google.protobuf.StringValue + 139, // 86: Fdb.FDBCLIThrottleActionOff.tag:type_name -> google.protobuf.StringValue + 139, // 87: Fdb.FDBCLIThrottleActionOff.priority:type_name -> google.protobuf.StringValue + 139, // 88: Fdb.FDBCLIThrottleActionList.type:type_name -> google.protobuf.StringValue + 140, // 89: Fdb.FDBCLIThrottleActionList.limit:type_name -> google.protobuf.UInt32Value 97, // 90: Fdb.FDBCLIThrottle.on:type_name -> Fdb.FDBCLIThrottleActionOn 98, // 91: Fdb.FDBCLIThrottle.off:type_name -> Fdb.FDBCLIThrottleActionOff 99, // 92: Fdb.FDBCLIThrottle.enable:type_name -> Fdb.FDBCLIThrottleActionEnable @@ -9784,22 +10366,22 @@ var file_fdb_proto_depIdxs = []int32{ 118, // 150: Fdb.FDBCLICommand.waitconnected:type_name -> Fdb.FDBCLIWaitconnected 119, // 151: Fdb.FDBCLICommand.waitopen:type_name -> Fdb.FDBCLIWaitopen 121, // 152: Fdb.FDBCLICommand.unknown:type_name -> Fdb.FDBCLIUnknownAction - 131, // 153: Fdb.FDBCLIRequest.config:type_name -> google.protobuf.StringValue - 133, // 154: Fdb.FDBCLIRequest.log:type_name -> google.protobuf.BoolValue - 131, // 155: Fdb.FDBCLIRequest.trace_format:type_name -> google.protobuf.StringValue - 131, // 156: Fdb.FDBCLIRequest.tls_certificate_file:type_name -> google.protobuf.StringValue - 131, // 157: Fdb.FDBCLIRequest.tls_ca_file:type_name -> google.protobuf.StringValue - 131, // 158: Fdb.FDBCLIRequest.tls_key_file:type_name -> google.protobuf.StringValue - 131, // 159: Fdb.FDBCLIRequest.tls_password:type_name -> google.protobuf.StringValue - 131, // 160: Fdb.FDBCLIRequest.tls_verify_peers:type_name -> google.protobuf.StringValue - 133, // 161: Fdb.FDBCLIRequest.debug_tls:type_name -> google.protobuf.BoolValue - 133, // 162: Fdb.FDBCLIRequest.version:type_name -> google.protobuf.BoolValue - 131, // 163: Fdb.FDBCLIRequest.log_group:type_name -> google.protobuf.StringValue - 133, // 164: Fdb.FDBCLIRequest.no_status:type_name -> google.protobuf.BoolValue - 131, // 165: Fdb.FDBCLIRequest.memory:type_name -> google.protobuf.StringValue - 133, // 166: Fdb.FDBCLIRequest.build_flags:type_name -> google.protobuf.BoolValue - 135, // 167: Fdb.FDBCLIRequest.timeout:type_name -> google.protobuf.Int32Value - 131, // 168: Fdb.FDBCLIRequest.knobs:type_name -> google.protobuf.StringValue + 139, // 153: Fdb.FDBCLIRequest.config:type_name -> google.protobuf.StringValue + 141, // 154: Fdb.FDBCLIRequest.log:type_name -> google.protobuf.BoolValue + 139, // 155: Fdb.FDBCLIRequest.trace_format:type_name -> google.protobuf.StringValue + 139, // 156: Fdb.FDBCLIRequest.tls_certificate_file:type_name -> google.protobuf.StringValue + 139, // 157: Fdb.FDBCLIRequest.tls_ca_file:type_name -> google.protobuf.StringValue + 139, // 158: Fdb.FDBCLIRequest.tls_key_file:type_name -> google.protobuf.StringValue + 139, // 159: Fdb.FDBCLIRequest.tls_password:type_name -> google.protobuf.StringValue + 139, // 160: Fdb.FDBCLIRequest.tls_verify_peers:type_name -> google.protobuf.StringValue + 141, // 161: Fdb.FDBCLIRequest.debug_tls:type_name -> google.protobuf.BoolValue + 141, // 162: Fdb.FDBCLIRequest.version:type_name -> google.protobuf.BoolValue + 139, // 163: Fdb.FDBCLIRequest.log_group:type_name -> google.protobuf.StringValue + 141, // 164: Fdb.FDBCLIRequest.no_status:type_name -> google.protobuf.BoolValue + 139, // 165: Fdb.FDBCLIRequest.memory:type_name -> google.protobuf.StringValue + 141, // 166: Fdb.FDBCLIRequest.build_flags:type_name -> google.protobuf.BoolValue + 143, // 167: Fdb.FDBCLIRequest.timeout:type_name -> google.protobuf.Int32Value + 139, // 168: Fdb.FDBCLIRequest.knobs:type_name -> google.protobuf.StringValue 120, // 169: Fdb.FDBCLIRequest.commands:type_name -> Fdb.FDBCLICommand 124, // 170: Fdb.FDBCLIResponse.output:type_name -> Fdb.FDBCLIResponseOutput 123, // 171: Fdb.FDBCLIResponse.log:type_name -> Fdb.Log @@ -9813,15 +10395,29 @@ var file_fdb_proto_depIdxs = []int32{ 7, // 179: Fdb.FDBMove.FDBMoveDataWait:input_type -> Fdb.FDBMoveDataWaitRequest 122, // 180: Fdb.CLI.FDBCLI:input_type -> Fdb.FDBCLIRequest 126, // 181: Fdb.Server.FDBServer:input_type -> Fdb.FDBServerRequest - 4, // 182: Fdb.Conf.Read:output_type -> Fdb.FdbConfResponse - 136, // 183: Fdb.Conf.Write:output_type -> google.protobuf.Empty - 136, // 184: Fdb.Conf.Delete:output_type -> google.protobuf.Empty - 6, // 185: Fdb.FDBMove.FDBMoveDataCopy:output_type -> Fdb.FDBMoveDataCopyResponse - 8, // 186: Fdb.FDBMove.FDBMoveDataWait:output_type -> Fdb.FDBMoveDataWaitResponse - 125, // 187: Fdb.CLI.FDBCLI:output_type -> Fdb.FDBCLIResponse - 130, // 188: Fdb.Server.FDBServer:output_type -> Fdb.FDBServerResponse - 182, // [182:189] is the sub-list for method output_type - 175, // [175:182] is the sub-list for method input_type + 131, // 182: Fdb.FDBBackup.FDBBackupStatus:input_type -> Fdb.FDBBackupStatusRequest + 132, // 183: Fdb.FDBBackup.FDBBackupAbort:input_type -> Fdb.FDBBackupAbortRequest + 133, // 184: Fdb.FDBBackup.FDBBackupStart:input_type -> Fdb.FDBBackupStartRequest + 134, // 185: Fdb.FDBBackup.FDBBackupDescribe:input_type -> Fdb.FDBBackupDescribeRequest + 135, // 186: Fdb.FDBBackup.FDBBackupExpire:input_type -> Fdb.FDBBackupExpireRequest + 136, // 187: Fdb.FDBBackup.FDBBackupPause:input_type -> Fdb.FDBBackupPauseRequest + 137, // 188: Fdb.FDBBackup.FDBBackupResume:input_type -> Fdb.FDBBackupResumeRequest + 4, // 189: Fdb.Conf.Read:output_type -> Fdb.FdbConfResponse + 144, // 190: Fdb.Conf.Write:output_type -> google.protobuf.Empty + 144, // 191: Fdb.Conf.Delete:output_type -> google.protobuf.Empty + 6, // 192: Fdb.FDBMove.FDBMoveDataCopy:output_type -> Fdb.FDBMoveDataCopyResponse + 8, // 193: Fdb.FDBMove.FDBMoveDataWait:output_type -> Fdb.FDBMoveDataWaitResponse + 125, // 194: Fdb.CLI.FDBCLI:output_type -> Fdb.FDBCLIResponse + 130, // 195: Fdb.Server.FDBServer:output_type -> Fdb.FDBServerResponse + 138, // 196: Fdb.FDBBackup.FDBBackupStatus:output_type -> Fdb.FDBBackupResponse + 138, // 197: Fdb.FDBBackup.FDBBackupAbort:output_type -> Fdb.FDBBackupResponse + 138, // 198: Fdb.FDBBackup.FDBBackupStart:output_type -> Fdb.FDBBackupResponse + 138, // 199: Fdb.FDBBackup.FDBBackupDescribe:output_type -> Fdb.FDBBackupResponse + 138, // 200: Fdb.FDBBackup.FDBBackupExpire:output_type -> Fdb.FDBBackupResponse + 138, // 201: Fdb.FDBBackup.FDBBackupPause:output_type -> Fdb.FDBBackupResponse + 138, // 202: Fdb.FDBBackup.FDBBackupResume:output_type -> Fdb.FDBBackupResponse + 189, // [189:203] is the sub-list for method output_type + 175, // [175:189] is the sub-list for method input_type 175, // [175:175] is the sub-list for extension type_name 175, // [175:175] is the sub-list for extension extendee 0, // [0:175] is the sub-list for field type_name @@ -11405,6 +12001,102 @@ func file_fdb_proto_init() { return nil } } + file_fdb_proto_msgTypes[131].Exporter = func(v any, i int) any { + switch v := v.(*FDBBackupStatusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_fdb_proto_msgTypes[132].Exporter = func(v any, i int) any { + switch v := v.(*FDBBackupAbortRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_fdb_proto_msgTypes[133].Exporter = func(v any, i int) any { + switch v := v.(*FDBBackupStartRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_fdb_proto_msgTypes[134].Exporter = func(v any, i int) any { + switch v := v.(*FDBBackupDescribeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_fdb_proto_msgTypes[135].Exporter = func(v any, i int) any { + switch v := v.(*FDBBackupExpireRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_fdb_proto_msgTypes[136].Exporter = func(v any, i int) any { + switch v := v.(*FDBBackupPauseRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_fdb_proto_msgTypes[137].Exporter = func(v any, i int) any { + switch v := v.(*FDBBackupResumeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_fdb_proto_msgTypes[138].Exporter = func(v any, i int) any { + switch v := v.(*FDBBackupResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_fdb_proto_msgTypes[13].OneofWrappers = []any{ (*FDBCLIBlobrange_Start)(nil), @@ -11578,9 +12270,9 @@ func file_fdb_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_fdb_proto_rawDesc, NumEnums: 0, - NumMessages: 131, + NumMessages: 139, NumExtensions: 0, - NumServices: 4, + NumServices: 5, }, GoTypes: file_fdb_proto_goTypes, DependencyIndexes: file_fdb_proto_depIdxs, diff --git a/services/fdb/fdb.proto b/services/fdb/fdb.proto index a0e53364..72539ef3 100644 --- a/services/fdb/fdb.proto +++ b/services/fdb/fdb.proto @@ -718,3 +718,60 @@ message FDBServerResponse { bytes stderr = 2; int32 retCode = 3; } + +// fdbbackup +service FDBBackup { + rpc FDBBackupStatus(FDBBackupStatusRequest) returns (FDBBackupResponse) {} + rpc FDBBackupAbort(FDBBackupAbortRequest) returns (FDBBackupResponse) {} + rpc FDBBackupStart(FDBBackupStartRequest) returns (FDBBackupResponse) {} + rpc FDBBackupDescribe(FDBBackupDescribeRequest) returns (FDBBackupResponse) {} + rpc FDBBackupExpire(FDBBackupExpireRequest) returns (FDBBackupResponse) {} + rpc FDBBackupPause(FDBBackupPauseRequest) returns (FDBBackupResponse) {} + rpc FDBBackupResume(FDBBackupResumeRequest) returns (FDBBackupResponse) {} +} + +message FDBBackupStatusRequest { + string cluster_file = 1; + string backup_url = 2; +} + +message FDBBackupAbortRequest { + string cluster_file = 1; + string backup_url = 2; +} + +message FDBBackupStartRequest { + string cluster_file = 1; + string backup_url = 2; + bool snapshot = 3; + string tag = 4; +} + +message FDBBackupDescribeRequest { + string cluster_file = 1; + string backup_url = 2; +} + +message FDBBackupExpireRequest { + string cluster_file = 1; + string backup_url = 2; + string version = 3; +} + +message FDBBackupPauseRequest { + string cluster_file = 1; + string backup_url = 2; + string tag = 3; +} + +message FDBBackupResumeRequest { + string cluster_file = 1; + string backup_url = 2; + string tag = 3; +} + +message FDBBackupResponse { + bytes stdout = 1; + bytes stderr = 2; + int32 retCode = 3; +} diff --git a/services/fdb/fdb_grpc.pb.go b/services/fdb/fdb_grpc.pb.go index 0afa2534..a6dd3203 100644 --- a/services/fdb/fdb_grpc.pb.go +++ b/services/fdb/fdb_grpc.pb.go @@ -564,3 +564,335 @@ var Server_ServiceDesc = grpc.ServiceDesc{ Streams: []grpc.StreamDesc{}, Metadata: "fdb.proto", } + +const ( + FDBBackup_FDBBackupStatus_FullMethodName = "/Fdb.FDBBackup/FDBBackupStatus" + FDBBackup_FDBBackupAbort_FullMethodName = "/Fdb.FDBBackup/FDBBackupAbort" + FDBBackup_FDBBackupStart_FullMethodName = "/Fdb.FDBBackup/FDBBackupStart" + FDBBackup_FDBBackupDescribe_FullMethodName = "/Fdb.FDBBackup/FDBBackupDescribe" + FDBBackup_FDBBackupExpire_FullMethodName = "/Fdb.FDBBackup/FDBBackupExpire" + FDBBackup_FDBBackupPause_FullMethodName = "/Fdb.FDBBackup/FDBBackupPause" + FDBBackup_FDBBackupResume_FullMethodName = "/Fdb.FDBBackup/FDBBackupResume" +) + +// FDBBackupClient is the client API for FDBBackup 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. +// +// fdbbackup +type FDBBackupClient interface { + FDBBackupStatus(ctx context.Context, in *FDBBackupStatusRequest, opts ...grpc.CallOption) (*FDBBackupResponse, error) + FDBBackupAbort(ctx context.Context, in *FDBBackupAbortRequest, opts ...grpc.CallOption) (*FDBBackupResponse, error) + FDBBackupStart(ctx context.Context, in *FDBBackupStartRequest, opts ...grpc.CallOption) (*FDBBackupResponse, error) + FDBBackupDescribe(ctx context.Context, in *FDBBackupDescribeRequest, opts ...grpc.CallOption) (*FDBBackupResponse, error) + FDBBackupExpire(ctx context.Context, in *FDBBackupExpireRequest, opts ...grpc.CallOption) (*FDBBackupResponse, error) + FDBBackupPause(ctx context.Context, in *FDBBackupPauseRequest, opts ...grpc.CallOption) (*FDBBackupResponse, error) + FDBBackupResume(ctx context.Context, in *FDBBackupResumeRequest, opts ...grpc.CallOption) (*FDBBackupResponse, error) +} + +type fDBBackupClient struct { + cc grpc.ClientConnInterface +} + +func NewFDBBackupClient(cc grpc.ClientConnInterface) FDBBackupClient { + return &fDBBackupClient{cc} +} + +func (c *fDBBackupClient) FDBBackupStatus(ctx context.Context, in *FDBBackupStatusRequest, opts ...grpc.CallOption) (*FDBBackupResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(FDBBackupResponse) + err := c.cc.Invoke(ctx, FDBBackup_FDBBackupStatus_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *fDBBackupClient) FDBBackupAbort(ctx context.Context, in *FDBBackupAbortRequest, opts ...grpc.CallOption) (*FDBBackupResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(FDBBackupResponse) + err := c.cc.Invoke(ctx, FDBBackup_FDBBackupAbort_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *fDBBackupClient) FDBBackupStart(ctx context.Context, in *FDBBackupStartRequest, opts ...grpc.CallOption) (*FDBBackupResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(FDBBackupResponse) + err := c.cc.Invoke(ctx, FDBBackup_FDBBackupStart_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *fDBBackupClient) FDBBackupDescribe(ctx context.Context, in *FDBBackupDescribeRequest, opts ...grpc.CallOption) (*FDBBackupResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(FDBBackupResponse) + err := c.cc.Invoke(ctx, FDBBackup_FDBBackupDescribe_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *fDBBackupClient) FDBBackupExpire(ctx context.Context, in *FDBBackupExpireRequest, opts ...grpc.CallOption) (*FDBBackupResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(FDBBackupResponse) + err := c.cc.Invoke(ctx, FDBBackup_FDBBackupExpire_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *fDBBackupClient) FDBBackupPause(ctx context.Context, in *FDBBackupPauseRequest, opts ...grpc.CallOption) (*FDBBackupResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(FDBBackupResponse) + err := c.cc.Invoke(ctx, FDBBackup_FDBBackupPause_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *fDBBackupClient) FDBBackupResume(ctx context.Context, in *FDBBackupResumeRequest, opts ...grpc.CallOption) (*FDBBackupResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(FDBBackupResponse) + err := c.cc.Invoke(ctx, FDBBackup_FDBBackupResume_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// FDBBackupServer is the server API for FDBBackup service. +// All implementations should embed UnimplementedFDBBackupServer +// for forward compatibility. +// +// fdbbackup +type FDBBackupServer interface { + FDBBackupStatus(context.Context, *FDBBackupStatusRequest) (*FDBBackupResponse, error) + FDBBackupAbort(context.Context, *FDBBackupAbortRequest) (*FDBBackupResponse, error) + FDBBackupStart(context.Context, *FDBBackupStartRequest) (*FDBBackupResponse, error) + FDBBackupDescribe(context.Context, *FDBBackupDescribeRequest) (*FDBBackupResponse, error) + FDBBackupExpire(context.Context, *FDBBackupExpireRequest) (*FDBBackupResponse, error) + FDBBackupPause(context.Context, *FDBBackupPauseRequest) (*FDBBackupResponse, error) + FDBBackupResume(context.Context, *FDBBackupResumeRequest) (*FDBBackupResponse, error) +} + +// UnimplementedFDBBackupServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedFDBBackupServer struct{} + +func (UnimplementedFDBBackupServer) FDBBackupStatus(context.Context, *FDBBackupStatusRequest) (*FDBBackupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FDBBackupStatus not implemented") +} +func (UnimplementedFDBBackupServer) FDBBackupAbort(context.Context, *FDBBackupAbortRequest) (*FDBBackupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FDBBackupAbort not implemented") +} +func (UnimplementedFDBBackupServer) FDBBackupStart(context.Context, *FDBBackupStartRequest) (*FDBBackupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FDBBackupStart not implemented") +} +func (UnimplementedFDBBackupServer) FDBBackupDescribe(context.Context, *FDBBackupDescribeRequest) (*FDBBackupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FDBBackupDescribe not implemented") +} +func (UnimplementedFDBBackupServer) FDBBackupExpire(context.Context, *FDBBackupExpireRequest) (*FDBBackupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FDBBackupExpire not implemented") +} +func (UnimplementedFDBBackupServer) FDBBackupPause(context.Context, *FDBBackupPauseRequest) (*FDBBackupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FDBBackupPause not implemented") +} +func (UnimplementedFDBBackupServer) FDBBackupResume(context.Context, *FDBBackupResumeRequest) (*FDBBackupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FDBBackupResume not implemented") +} +func (UnimplementedFDBBackupServer) testEmbeddedByValue() {} + +// UnsafeFDBBackupServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to FDBBackupServer will +// result in compilation errors. +type UnsafeFDBBackupServer interface { + mustEmbedUnimplementedFDBBackupServer() +} + +func RegisterFDBBackupServer(s grpc.ServiceRegistrar, srv FDBBackupServer) { + // If the following call pancis, it indicates UnimplementedFDBBackupServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&FDBBackup_ServiceDesc, srv) +} + +func _FDBBackup_FDBBackupStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FDBBackupStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FDBBackupServer).FDBBackupStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FDBBackup_FDBBackupStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FDBBackupServer).FDBBackupStatus(ctx, req.(*FDBBackupStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FDBBackup_FDBBackupAbort_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FDBBackupAbortRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FDBBackupServer).FDBBackupAbort(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FDBBackup_FDBBackupAbort_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FDBBackupServer).FDBBackupAbort(ctx, req.(*FDBBackupAbortRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FDBBackup_FDBBackupStart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FDBBackupStartRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FDBBackupServer).FDBBackupStart(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FDBBackup_FDBBackupStart_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FDBBackupServer).FDBBackupStart(ctx, req.(*FDBBackupStartRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FDBBackup_FDBBackupDescribe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FDBBackupDescribeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FDBBackupServer).FDBBackupDescribe(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FDBBackup_FDBBackupDescribe_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FDBBackupServer).FDBBackupDescribe(ctx, req.(*FDBBackupDescribeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FDBBackup_FDBBackupExpire_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FDBBackupExpireRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FDBBackupServer).FDBBackupExpire(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FDBBackup_FDBBackupExpire_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FDBBackupServer).FDBBackupExpire(ctx, req.(*FDBBackupExpireRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FDBBackup_FDBBackupPause_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FDBBackupPauseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FDBBackupServer).FDBBackupPause(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FDBBackup_FDBBackupPause_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FDBBackupServer).FDBBackupPause(ctx, req.(*FDBBackupPauseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FDBBackup_FDBBackupResume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FDBBackupResumeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FDBBackupServer).FDBBackupResume(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FDBBackup_FDBBackupResume_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FDBBackupServer).FDBBackupResume(ctx, req.(*FDBBackupResumeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// FDBBackup_ServiceDesc is the grpc.ServiceDesc for FDBBackup service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var FDBBackup_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "Fdb.FDBBackup", + HandlerType: (*FDBBackupServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "FDBBackupStatus", + Handler: _FDBBackup_FDBBackupStatus_Handler, + }, + { + MethodName: "FDBBackupAbort", + Handler: _FDBBackup_FDBBackupAbort_Handler, + }, + { + MethodName: "FDBBackupStart", + Handler: _FDBBackup_FDBBackupStart_Handler, + }, + { + MethodName: "FDBBackupDescribe", + Handler: _FDBBackup_FDBBackupDescribe_Handler, + }, + { + MethodName: "FDBBackupExpire", + Handler: _FDBBackup_FDBBackupExpire_Handler, + }, + { + MethodName: "FDBBackupPause", + Handler: _FDBBackup_FDBBackupPause_Handler, + }, + { + MethodName: "FDBBackupResume", + Handler: _FDBBackup_FDBBackupResume_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "fdb.proto", +} diff --git a/services/fdb/fdb_grpcproxy.pb.go b/services/fdb/fdb_grpcproxy.pb.go index 1f6e83ea..be300b6c 100644 --- a/services/fdb/fdb_grpcproxy.pb.go +++ b/services/fdb/fdb_grpcproxy.pb.go @@ -598,3 +598,495 @@ func (c *serverClientProxy) FDBServerOneMany(ctx context.Context, in *FDBServerR return ret, nil } + +// FDBBackupClientProxy is the superset of FDBBackupClient which additionally includes the OneMany proxy methods +type FDBBackupClientProxy interface { + FDBBackupClient + FDBBackupStatusOneMany(ctx context.Context, in *FDBBackupStatusRequest, opts ...grpc.CallOption) (<-chan *FDBBackupStatusManyResponse, error) + FDBBackupAbortOneMany(ctx context.Context, in *FDBBackupAbortRequest, opts ...grpc.CallOption) (<-chan *FDBBackupAbortManyResponse, error) + FDBBackupStartOneMany(ctx context.Context, in *FDBBackupStartRequest, opts ...grpc.CallOption) (<-chan *FDBBackupStartManyResponse, error) + FDBBackupDescribeOneMany(ctx context.Context, in *FDBBackupDescribeRequest, opts ...grpc.CallOption) (<-chan *FDBBackupDescribeManyResponse, error) + FDBBackupExpireOneMany(ctx context.Context, in *FDBBackupExpireRequest, opts ...grpc.CallOption) (<-chan *FDBBackupExpireManyResponse, error) + FDBBackupPauseOneMany(ctx context.Context, in *FDBBackupPauseRequest, opts ...grpc.CallOption) (<-chan *FDBBackupPauseManyResponse, error) + FDBBackupResumeOneMany(ctx context.Context, in *FDBBackupResumeRequest, opts ...grpc.CallOption) (<-chan *FDBBackupResumeManyResponse, error) +} + +// Embed the original client inside of this so we get the other generated methods automatically. +type fDBBackupClientProxy struct { + *fDBBackupClient +} + +// NewFDBBackupClientProxy creates a FDBBackupClientProxy for use in proxied connections. +// NOTE: This takes a proxy.Conn instead of a generic ClientConnInterface as the methods here are only valid in proxy.Conn contexts. +func NewFDBBackupClientProxy(cc *proxy.Conn) FDBBackupClientProxy { + return &fDBBackupClientProxy{NewFDBBackupClient(cc).(*fDBBackupClient)} +} + +// FDBBackupStatusManyResponse encapsulates a proxy data packet. +// It includes the target, index, response and possible error returned. +type FDBBackupStatusManyResponse struct { + Target string + // As targets can be duplicated this is the index into the slice passed to proxy.Conn. + Index int + Resp *FDBBackupResponse + Error error +} + +// FDBBackupStatusOneMany provides the same API as FDBBackupStatus but sends the same request to N destinations at once. +// N can be a single destination. +// +// NOTE: The returned channel must be read until it closes in order to avoid leaking goroutines. +func (c *fDBBackupClientProxy) FDBBackupStatusOneMany(ctx context.Context, in *FDBBackupStatusRequest, opts ...grpc.CallOption) (<-chan *FDBBackupStatusManyResponse, error) { + conn := c.cc.(*proxy.Conn) + ret := make(chan *FDBBackupStatusManyResponse) + // If this is a single case we can just use Invoke and marshal it onto the channel once and be done. + if len(conn.Targets) == 1 { + go func() { + out := &FDBBackupStatusManyResponse{ + Target: conn.Targets[0], + Index: 0, + Resp: &FDBBackupResponse{}, + } + err := conn.Invoke(ctx, "/Fdb.FDBBackup/FDBBackupStatus", in, out.Resp, opts...) + if err != nil { + out.Error = err + } + // Send and close. + ret <- out + close(ret) + }() + return ret, nil + } + manyRet, err := conn.InvokeOneMany(ctx, "/Fdb.FDBBackup/FDBBackupStatus", in, opts...) + if err != nil { + return nil, err + } + // A goroutine to retrive untyped responses and convert them to typed ones. + go func() { + for { + typedResp := &FDBBackupStatusManyResponse{ + Resp: &FDBBackupResponse{}, + } + + resp, ok := <-manyRet + if !ok { + // All done so we can shut down. + close(ret) + return + } + typedResp.Target = resp.Target + typedResp.Index = resp.Index + typedResp.Error = resp.Error + if resp.Error == nil { + if err := resp.Resp.UnmarshalTo(typedResp.Resp); err != nil { + typedResp.Error = fmt.Errorf("can't decode any response - %v. Original Error - %v", err, resp.Error) + } + } + ret <- typedResp + } + }() + + return ret, nil +} + +// FDBBackupAbortManyResponse encapsulates a proxy data packet. +// It includes the target, index, response and possible error returned. +type FDBBackupAbortManyResponse struct { + Target string + // As targets can be duplicated this is the index into the slice passed to proxy.Conn. + Index int + Resp *FDBBackupResponse + Error error +} + +// FDBBackupAbortOneMany provides the same API as FDBBackupAbort but sends the same request to N destinations at once. +// N can be a single destination. +// +// NOTE: The returned channel must be read until it closes in order to avoid leaking goroutines. +func (c *fDBBackupClientProxy) FDBBackupAbortOneMany(ctx context.Context, in *FDBBackupAbortRequest, opts ...grpc.CallOption) (<-chan *FDBBackupAbortManyResponse, error) { + conn := c.cc.(*proxy.Conn) + ret := make(chan *FDBBackupAbortManyResponse) + // If this is a single case we can just use Invoke and marshal it onto the channel once and be done. + if len(conn.Targets) == 1 { + go func() { + out := &FDBBackupAbortManyResponse{ + Target: conn.Targets[0], + Index: 0, + Resp: &FDBBackupResponse{}, + } + err := conn.Invoke(ctx, "/Fdb.FDBBackup/FDBBackupAbort", in, out.Resp, opts...) + if err != nil { + out.Error = err + } + // Send and close. + ret <- out + close(ret) + }() + return ret, nil + } + manyRet, err := conn.InvokeOneMany(ctx, "/Fdb.FDBBackup/FDBBackupAbort", in, opts...) + if err != nil { + return nil, err + } + // A goroutine to retrive untyped responses and convert them to typed ones. + go func() { + for { + typedResp := &FDBBackupAbortManyResponse{ + Resp: &FDBBackupResponse{}, + } + + resp, ok := <-manyRet + if !ok { + // All done so we can shut down. + close(ret) + return + } + typedResp.Target = resp.Target + typedResp.Index = resp.Index + typedResp.Error = resp.Error + if resp.Error == nil { + if err := resp.Resp.UnmarshalTo(typedResp.Resp); err != nil { + typedResp.Error = fmt.Errorf("can't decode any response - %v. Original Error - %v", err, resp.Error) + } + } + ret <- typedResp + } + }() + + return ret, nil +} + +// FDBBackupStartManyResponse encapsulates a proxy data packet. +// It includes the target, index, response and possible error returned. +type FDBBackupStartManyResponse struct { + Target string + // As targets can be duplicated this is the index into the slice passed to proxy.Conn. + Index int + Resp *FDBBackupResponse + Error error +} + +// FDBBackupStartOneMany provides the same API as FDBBackupStart but sends the same request to N destinations at once. +// N can be a single destination. +// +// NOTE: The returned channel must be read until it closes in order to avoid leaking goroutines. +func (c *fDBBackupClientProxy) FDBBackupStartOneMany(ctx context.Context, in *FDBBackupStartRequest, opts ...grpc.CallOption) (<-chan *FDBBackupStartManyResponse, error) { + conn := c.cc.(*proxy.Conn) + ret := make(chan *FDBBackupStartManyResponse) + // If this is a single case we can just use Invoke and marshal it onto the channel once and be done. + if len(conn.Targets) == 1 { + go func() { + out := &FDBBackupStartManyResponse{ + Target: conn.Targets[0], + Index: 0, + Resp: &FDBBackupResponse{}, + } + err := conn.Invoke(ctx, "/Fdb.FDBBackup/FDBBackupStart", in, out.Resp, opts...) + if err != nil { + out.Error = err + } + // Send and close. + ret <- out + close(ret) + }() + return ret, nil + } + manyRet, err := conn.InvokeOneMany(ctx, "/Fdb.FDBBackup/FDBBackupStart", in, opts...) + if err != nil { + return nil, err + } + // A goroutine to retrive untyped responses and convert them to typed ones. + go func() { + for { + typedResp := &FDBBackupStartManyResponse{ + Resp: &FDBBackupResponse{}, + } + + resp, ok := <-manyRet + if !ok { + // All done so we can shut down. + close(ret) + return + } + typedResp.Target = resp.Target + typedResp.Index = resp.Index + typedResp.Error = resp.Error + if resp.Error == nil { + if err := resp.Resp.UnmarshalTo(typedResp.Resp); err != nil { + typedResp.Error = fmt.Errorf("can't decode any response - %v. Original Error - %v", err, resp.Error) + } + } + ret <- typedResp + } + }() + + return ret, nil +} + +// FDBBackupDescribeManyResponse encapsulates a proxy data packet. +// It includes the target, index, response and possible error returned. +type FDBBackupDescribeManyResponse struct { + Target string + // As targets can be duplicated this is the index into the slice passed to proxy.Conn. + Index int + Resp *FDBBackupResponse + Error error +} + +// FDBBackupDescribeOneMany provides the same API as FDBBackupDescribe but sends the same request to N destinations at once. +// N can be a single destination. +// +// NOTE: The returned channel must be read until it closes in order to avoid leaking goroutines. +func (c *fDBBackupClientProxy) FDBBackupDescribeOneMany(ctx context.Context, in *FDBBackupDescribeRequest, opts ...grpc.CallOption) (<-chan *FDBBackupDescribeManyResponse, error) { + conn := c.cc.(*proxy.Conn) + ret := make(chan *FDBBackupDescribeManyResponse) + // If this is a single case we can just use Invoke and marshal it onto the channel once and be done. + if len(conn.Targets) == 1 { + go func() { + out := &FDBBackupDescribeManyResponse{ + Target: conn.Targets[0], + Index: 0, + Resp: &FDBBackupResponse{}, + } + err := conn.Invoke(ctx, "/Fdb.FDBBackup/FDBBackupDescribe", in, out.Resp, opts...) + if err != nil { + out.Error = err + } + // Send and close. + ret <- out + close(ret) + }() + return ret, nil + } + manyRet, err := conn.InvokeOneMany(ctx, "/Fdb.FDBBackup/FDBBackupDescribe", in, opts...) + if err != nil { + return nil, err + } + // A goroutine to retrive untyped responses and convert them to typed ones. + go func() { + for { + typedResp := &FDBBackupDescribeManyResponse{ + Resp: &FDBBackupResponse{}, + } + + resp, ok := <-manyRet + if !ok { + // All done so we can shut down. + close(ret) + return + } + typedResp.Target = resp.Target + typedResp.Index = resp.Index + typedResp.Error = resp.Error + if resp.Error == nil { + if err := resp.Resp.UnmarshalTo(typedResp.Resp); err != nil { + typedResp.Error = fmt.Errorf("can't decode any response - %v. Original Error - %v", err, resp.Error) + } + } + ret <- typedResp + } + }() + + return ret, nil +} + +// FDBBackupExpireManyResponse encapsulates a proxy data packet. +// It includes the target, index, response and possible error returned. +type FDBBackupExpireManyResponse struct { + Target string + // As targets can be duplicated this is the index into the slice passed to proxy.Conn. + Index int + Resp *FDBBackupResponse + Error error +} + +// FDBBackupExpireOneMany provides the same API as FDBBackupExpire but sends the same request to N destinations at once. +// N can be a single destination. +// +// NOTE: The returned channel must be read until it closes in order to avoid leaking goroutines. +func (c *fDBBackupClientProxy) FDBBackupExpireOneMany(ctx context.Context, in *FDBBackupExpireRequest, opts ...grpc.CallOption) (<-chan *FDBBackupExpireManyResponse, error) { + conn := c.cc.(*proxy.Conn) + ret := make(chan *FDBBackupExpireManyResponse) + // If this is a single case we can just use Invoke and marshal it onto the channel once and be done. + if len(conn.Targets) == 1 { + go func() { + out := &FDBBackupExpireManyResponse{ + Target: conn.Targets[0], + Index: 0, + Resp: &FDBBackupResponse{}, + } + err := conn.Invoke(ctx, "/Fdb.FDBBackup/FDBBackupExpire", in, out.Resp, opts...) + if err != nil { + out.Error = err + } + // Send and close. + ret <- out + close(ret) + }() + return ret, nil + } + manyRet, err := conn.InvokeOneMany(ctx, "/Fdb.FDBBackup/FDBBackupExpire", in, opts...) + if err != nil { + return nil, err + } + // A goroutine to retrive untyped responses and convert them to typed ones. + go func() { + for { + typedResp := &FDBBackupExpireManyResponse{ + Resp: &FDBBackupResponse{}, + } + + resp, ok := <-manyRet + if !ok { + // All done so we can shut down. + close(ret) + return + } + typedResp.Target = resp.Target + typedResp.Index = resp.Index + typedResp.Error = resp.Error + if resp.Error == nil { + if err := resp.Resp.UnmarshalTo(typedResp.Resp); err != nil { + typedResp.Error = fmt.Errorf("can't decode any response - %v. Original Error - %v", err, resp.Error) + } + } + ret <- typedResp + } + }() + + return ret, nil +} + +// FDBBackupPauseManyResponse encapsulates a proxy data packet. +// It includes the target, index, response and possible error returned. +type FDBBackupPauseManyResponse struct { + Target string + // As targets can be duplicated this is the index into the slice passed to proxy.Conn. + Index int + Resp *FDBBackupResponse + Error error +} + +// FDBBackupPauseOneMany provides the same API as FDBBackupPause but sends the same request to N destinations at once. +// N can be a single destination. +// +// NOTE: The returned channel must be read until it closes in order to avoid leaking goroutines. +func (c *fDBBackupClientProxy) FDBBackupPauseOneMany(ctx context.Context, in *FDBBackupPauseRequest, opts ...grpc.CallOption) (<-chan *FDBBackupPauseManyResponse, error) { + conn := c.cc.(*proxy.Conn) + ret := make(chan *FDBBackupPauseManyResponse) + // If this is a single case we can just use Invoke and marshal it onto the channel once and be done. + if len(conn.Targets) == 1 { + go func() { + out := &FDBBackupPauseManyResponse{ + Target: conn.Targets[0], + Index: 0, + Resp: &FDBBackupResponse{}, + } + err := conn.Invoke(ctx, "/Fdb.FDBBackup/FDBBackupPause", in, out.Resp, opts...) + if err != nil { + out.Error = err + } + // Send and close. + ret <- out + close(ret) + }() + return ret, nil + } + manyRet, err := conn.InvokeOneMany(ctx, "/Fdb.FDBBackup/FDBBackupPause", in, opts...) + if err != nil { + return nil, err + } + // A goroutine to retrive untyped responses and convert them to typed ones. + go func() { + for { + typedResp := &FDBBackupPauseManyResponse{ + Resp: &FDBBackupResponse{}, + } + + resp, ok := <-manyRet + if !ok { + // All done so we can shut down. + close(ret) + return + } + typedResp.Target = resp.Target + typedResp.Index = resp.Index + typedResp.Error = resp.Error + if resp.Error == nil { + if err := resp.Resp.UnmarshalTo(typedResp.Resp); err != nil { + typedResp.Error = fmt.Errorf("can't decode any response - %v. Original Error - %v", err, resp.Error) + } + } + ret <- typedResp + } + }() + + return ret, nil +} + +// FDBBackupResumeManyResponse encapsulates a proxy data packet. +// It includes the target, index, response and possible error returned. +type FDBBackupResumeManyResponse struct { + Target string + // As targets can be duplicated this is the index into the slice passed to proxy.Conn. + Index int + Resp *FDBBackupResponse + Error error +} + +// FDBBackupResumeOneMany provides the same API as FDBBackupResume but sends the same request to N destinations at once. +// N can be a single destination. +// +// NOTE: The returned channel must be read until it closes in order to avoid leaking goroutines. +func (c *fDBBackupClientProxy) FDBBackupResumeOneMany(ctx context.Context, in *FDBBackupResumeRequest, opts ...grpc.CallOption) (<-chan *FDBBackupResumeManyResponse, error) { + conn := c.cc.(*proxy.Conn) + ret := make(chan *FDBBackupResumeManyResponse) + // If this is a single case we can just use Invoke and marshal it onto the channel once and be done. + if len(conn.Targets) == 1 { + go func() { + out := &FDBBackupResumeManyResponse{ + Target: conn.Targets[0], + Index: 0, + Resp: &FDBBackupResponse{}, + } + err := conn.Invoke(ctx, "/Fdb.FDBBackup/FDBBackupResume", in, out.Resp, opts...) + if err != nil { + out.Error = err + } + // Send and close. + ret <- out + close(ret) + }() + return ret, nil + } + manyRet, err := conn.InvokeOneMany(ctx, "/Fdb.FDBBackup/FDBBackupResume", in, opts...) + if err != nil { + return nil, err + } + // A goroutine to retrive untyped responses and convert them to typed ones. + go func() { + for { + typedResp := &FDBBackupResumeManyResponse{ + Resp: &FDBBackupResponse{}, + } + + resp, ok := <-manyRet + if !ok { + // All done so we can shut down. + close(ret) + return + } + typedResp.Target = resp.Target + typedResp.Index = resp.Index + typedResp.Error = resp.Error + if resp.Error == nil { + if err := resp.Resp.UnmarshalTo(typedResp.Resp); err != nil { + typedResp.Error = fmt.Errorf("can't decode any response - %v. Original Error - %v", err, resp.Error) + } + } + ret <- typedResp + } + }() + + return ret, nil +} diff --git a/services/fdb/server/fdbbackup.go b/services/fdb/server/fdbbackup.go new file mode 100644 index 00000000..eb4efab3 --- /dev/null +++ b/services/fdb/server/fdbbackup.go @@ -0,0 +1,222 @@ +/* Copyright (c) 2023 Snowflake Inc. All rights reserved. + Licensed under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +package server + +import ( + "context" + "errors" + "os" + "strings" + + "github.com/Snowflake-Labs/sansshell/services" + pb "github.com/Snowflake-Labs/sansshell/services/fdb" + "github.com/Snowflake-Labs/sansshell/services/util" + "github.com/Snowflake-Labs/sansshell/telemetry/metrics" + "go.opentelemetry.io/otel/attribute" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +var ( + // FDBBackup binary location + FDBBackup string = "/usr/sbin/fdbbackup" + + // FDBBackupEnvFile is a file with newline-separated environment variables to set before running fdbbackup + FDBBackupEnvFile string = "/etc/fdb.env" +) + +// Metrics +var ( + fdbbackupFailureCounter = metrics.MetricDefinition{Name: "actions_fdbbackup_failure", + Description: "number of failures when performing fdbbackup"} +) + +type fdbbackup struct{} + +func runFDBBackupCommand(ctx context.Context, args []string) (*pb.FDBBackupResponse, error) { + recorder := metrics.RecorderFromContextOrNoop(ctx) + + command := []string{FDBBackup} + command = append(command, args...) + + var opts []util.Option + // Add env vars from file if it exists + if _, err := os.Stat(FDBBackupEnvFile); !errors.Is(err, os.ErrNotExist) { + content, err := os.ReadFile(FDBBackupEnvFile) + if err != nil { + return nil, err + } + for _, l := range strings.Split(string(content), "\n") { + if l != "" { + opts = append(opts, util.EnvVar(l)) + } + } + } + + run, err := util.RunCommand(ctx, command[0], command[1:], opts...) + if err != nil { + recorder.CounterOrLog(ctx, fdbbackupFailureCounter, 1, attribute.String("reason", "run_err")) + return nil, status.Errorf(codes.Internal, "error running fdbbackup cmd (%+v): %v", command, err) + } + + resp := &pb.FDBBackupResponse{ + RetCode: int32(run.ExitCode), + Stderr: run.Stderr.Bytes(), + Stdout: run.Stdout.Bytes(), + } + + return resp, nil +} + +func (s *fdbbackup) FDBBackupStatus(ctx context.Context, req *pb.FDBBackupStatusRequest) (*pb.FDBBackupResponse, error) { + var args []string + + args = append(args, "status") + + if req.ClusterFile != "" { + args = append(args, "-C", req.ClusterFile) + } + + if req.BackupUrl != "" { + args = append(args, "--blob_url", req.BackupUrl) + } + + return runFDBBackupCommand(ctx, args) +} + +func (s *fdbbackup) FDBBackupAbort(ctx context.Context, req *pb.FDBBackupAbortRequest) (*pb.FDBBackupResponse, error) { + var args []string + + args = append(args, "abort") + + if req.ClusterFile != "" { + args = append(args, "-C", req.ClusterFile) + } + + if req.BackupUrl != "" { + args = append(args, "--blob_url", req.BackupUrl) + } + + return runFDBBackupCommand(ctx, args) +} + +func (s *fdbbackup) FDBBackupStart(ctx context.Context, req *pb.FDBBackupStartRequest) (*pb.FDBBackupResponse, error) { + var args []string + + args = append(args, "start") + + if req.ClusterFile != "" { + args = append(args, "-C", req.ClusterFile) + } + + if req.BackupUrl != "" { + args = append(args, "--blob_url", req.BackupUrl) + } + + if req.Snapshot { + args = append(args, "--snapshot") + } + + if req.Tag != "" { + args = append(args, "--tag", req.Tag) + } + + return runFDBBackupCommand(ctx, args) +} + +func (s *fdbbackup) FDBBackupDescribe(ctx context.Context, req *pb.FDBBackupDescribeRequest) (*pb.FDBBackupResponse, error) { + var args []string + + args = append(args, "describe") + + if req.ClusterFile != "" { + args = append(args, "-C", req.ClusterFile) + } + + if req.BackupUrl != "" { + args = append(args, "--blob_url", req.BackupUrl) + } + + return runFDBBackupCommand(ctx, args) +} + +func (s *fdbbackup) FDBBackupExpire(ctx context.Context, req *pb.FDBBackupExpireRequest) (*pb.FDBBackupResponse, error) { + var args []string + + args = append(args, "expire") + + if req.ClusterFile != "" { + args = append(args, "-C", req.ClusterFile) + } + + if req.BackupUrl != "" { + args = append(args, "--blob_url", req.BackupUrl) + } + + if req.Version != "" { + args = append(args, "--version", req.Version) + } + + return runFDBBackupCommand(ctx, args) +} + +func (s *fdbbackup) FDBBackupPause(ctx context.Context, req *pb.FDBBackupPauseRequest) (*pb.FDBBackupResponse, error) { + var args []string + + args = append(args, "pause") + + if req.ClusterFile != "" { + args = append(args, "-C", req.ClusterFile) + } + + if req.BackupUrl != "" { + args = append(args, "--blob_url", req.BackupUrl) + } + + if req.Tag != "" { + args = append(args, "--tag", req.Tag) + } + + return runFDBBackupCommand(ctx, args) +} + +func (s *fdbbackup) FDBBackupResume(ctx context.Context, req *pb.FDBBackupResumeRequest) (*pb.FDBBackupResponse, error) { + var args []string + + args = append(args, "resume") + + if req.ClusterFile != "" { + args = append(args, "-C", req.ClusterFile) + } + + if req.BackupUrl != "" { + args = append(args, "--blob_url", req.BackupUrl) + } + + if req.Tag != "" { + args = append(args, "--tag", req.Tag) + } + + return runFDBBackupCommand(ctx, args) +} + +// Register is called to expose this handler to the gRPC server +func (s *fdbbackup) Register(gs *grpc.Server) { + pb.RegisterFDBBackupServer(gs, s) +} + +func init() { + services.RegisterSansShellService(&fdbbackup{}) +} diff --git a/services/fdb/server/server_test.go b/services/fdb/server/server_test.go index 38127e28..69a77c46 100644 --- a/services/fdb/server/server_test.go +++ b/services/fdb/server/server_test.go @@ -55,6 +55,9 @@ func TestMain(m *testing.M) { fdbm := &fdbmovedata{operations: make(map[int64]*moveOperation)} fdbm.Register(s) + fbdb := &fdbbackup{} + fbdb.Register(s) + go func() { if err := s.Serve(lis); err != nil { log.Fatalf("Server exited with error: %v", err) diff --git a/services/localfile/localfile.pb.go b/services/localfile/localfile.pb.go index 81cc222d..e1d76567 100644 --- a/services/localfile/localfile.pb.go +++ b/services/localfile/localfile.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.28.3 +// protoc v5.29.3 // source: localfile.proto package localfile diff --git a/services/localfile/localfile_grpc.pb.go b/services/localfile/localfile_grpc.pb.go index 72a588bd..6d67c545 100644 --- a/services/localfile/localfile_grpc.pb.go +++ b/services/localfile/localfile_grpc.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v5.28.3 +// - protoc v5.29.3 // source: localfile.proto package localfile