mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-01-11 05:13:10 +01:00
23 lines
593 B
Go
23 lines
593 B
Go
package instance
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
|
|
"github.com/cloudnative-pg/cnpg-i-machinery/pkg/pluginhelper/http"
|
|
"github.com/cloudnative-pg/cnpg-i/pkg/backup"
|
|
"github.com/cloudnative-pg/cnpg-i/pkg/wal"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
func NewCMD() *cobra.Command {
|
|
cmd := http.CreateMainCmd(IdentityImplementation{}, func(server *grpc.Server) error {
|
|
// Register the declared implementations
|
|
wal.RegisterWALServer(server, WALServiceImplementation{})
|
|
backup.RegisterBackupServer(server, BackupServiceImplementation{})
|
|
return nil
|
|
})
|
|
|
|
cmd.Use = "plugin-instance"
|
|
return cmd
|
|
}
|