mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-01-11 13:23:09 +01:00
22 lines
667 B
Go
22 lines
667 B
Go
package operator
|
|
|
|
import (
|
|
"github.com/cloudnative-pg/cnpg-i-machinery/pkg/pluginhelper/http"
|
|
"github.com/cloudnative-pg/cnpg-i/pkg/lifecycle"
|
|
"github.com/cloudnative-pg/cnpg-i/pkg/reconciler"
|
|
"github.com/spf13/cobra"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
// NewCommand creates the command to start the GRPC server
|
|
// of the operator plugin
|
|
func NewCommand() *cobra.Command {
|
|
cmd := http.CreateMainCmd(IdentityImplementation{}, func(server *grpc.Server) error {
|
|
reconciler.RegisterReconcilerHooksServer(server, ReconcilerImplementation{})
|
|
lifecycle.RegisterOperatorLifecycleServer(server, LifecycleImplementation{})
|
|
return nil
|
|
})
|
|
cmd.Use = "plugin"
|
|
return cmd
|
|
}
|