plugin-barman-cloud/internal/cnpgi/instance/cmd.go
Armando Ruocco 3f4759c47b
chore: scaffold (#2)
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
2024-09-26 11:52:56 +02:00

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
}