diff --git a/accounts/pkg/command/version.go b/accounts/pkg/command/version.go index 0705b40a65f..f5d222840bf 100644 --- a/accounts/pkg/command/version.go +++ b/accounts/pkg/command/version.go @@ -4,8 +4,9 @@ import ( "fmt" "os" + "github.com/owncloud/ocis/ocis-pkg/registry" + "github.com/micro/cli/v2" - "github.com/micro/go-micro/v2/registry/mdns" tw "github.com/olekukonko/tablewriter" "github.com/owncloud/ocis/accounts/pkg/config" "github.com/owncloud/ocis/accounts/pkg/flagset" @@ -18,7 +19,7 @@ func PrintVersion(cfg *config.Config) *cli.Command { Usage: "Print the versions of the running instances", Flags: flagset.ListAccountsWithConfig(cfg), Action: func(c *cli.Context) error { - reg := mdns.NewRegistry() + reg := *registry.GetRegistry() services, err := reg.GetService(cfg.GRPC.Namespace + "." + cfg.Server.Name) if err != nil { fmt.Println(fmt.Errorf("could not get accounts services from the registry: %v", err)) diff --git a/konnectd/pkg/command/version.go b/konnectd/pkg/command/version.go index 377b6112063..72f6d422707 100644 --- a/konnectd/pkg/command/version.go +++ b/konnectd/pkg/command/version.go @@ -4,8 +4,9 @@ import ( "fmt" "os" + "github.com/owncloud/ocis/ocis-pkg/registry" + "github.com/micro/cli/v2" - "github.com/micro/go-micro/v2/registry/mdns" tw "github.com/olekukonko/tablewriter" "github.com/owncloud/ocis/konnectd/pkg/config" "github.com/owncloud/ocis/konnectd/pkg/flagset" @@ -18,7 +19,7 @@ func PrintVersion(cfg *config.Config) *cli.Command { Usage: "Print the versions of the running instances", Flags: flagset.ListKonnectdWithConfig(cfg), Action: func(c *cli.Context) error { - reg := mdns.NewRegistry() + reg := *registry.GetRegistry() services, err := reg.GetService(cfg.Service.Namespace + "." + cfg.Service.Name) if err != nil { fmt.Println(fmt.Errorf("could not get konnectd services from the registry: %v", err)) diff --git a/ocs/pkg/command/version.go b/ocs/pkg/command/version.go index 6f4eae4872f..b61419f920c 100644 --- a/ocs/pkg/command/version.go +++ b/ocs/pkg/command/version.go @@ -4,8 +4,9 @@ import ( "fmt" "os" + "github.com/owncloud/ocis/ocis-pkg/registry" + "github.com/micro/cli/v2" - "github.com/micro/go-micro/v2/registry/mdns" tw "github.com/olekukonko/tablewriter" "github.com/owncloud/ocis/ocs/pkg/config" "github.com/owncloud/ocis/ocs/pkg/flagset" @@ -18,7 +19,7 @@ func PrintVersion(cfg *config.Config) *cli.Command { Usage: "Print the versions of the running instances", Flags: flagset.ListOcsWithConfig(cfg), Action: func(c *cli.Context) error { - reg := mdns.NewRegistry() + reg := *registry.GetRegistry() services, err := reg.GetService(cfg.Service.Namespace + "." + cfg.Service.Name) if err != nil { fmt.Println(fmt.Errorf("could not get ocs services from the registry: %v", err)) diff --git a/proxy/pkg/command/version.go b/proxy/pkg/command/version.go index 58b9eecc44f..f655589f2bf 100644 --- a/proxy/pkg/command/version.go +++ b/proxy/pkg/command/version.go @@ -4,8 +4,9 @@ import ( "fmt" "os" + "github.com/owncloud/ocis/ocis-pkg/registry" + "github.com/micro/cli/v2" - "github.com/micro/go-micro/v2/registry/mdns" tw "github.com/olekukonko/tablewriter" "github.com/owncloud/ocis/proxy/pkg/config" "github.com/owncloud/ocis/proxy/pkg/flagset" @@ -18,7 +19,7 @@ func PrintVersion(cfg *config.Config) *cli.Command { Usage: "Print the versions of the running instances", Flags: flagset.ListProxyWithConfig(cfg), Action: func(c *cli.Context) error { - reg := mdns.NewRegistry() + reg := *registry.GetRegistry() services, err := reg.GetService(cfg.Service.Namespace + "." + cfg.Service.Name) if err != nil { fmt.Println(fmt.Errorf("could not get proxy services from the registry: %v", err)) diff --git a/settings/pkg/command/version.go b/settings/pkg/command/version.go index f5a9926698b..3d3f15e726a 100644 --- a/settings/pkg/command/version.go +++ b/settings/pkg/command/version.go @@ -4,8 +4,9 @@ import ( "fmt" "os" + "github.com/owncloud/ocis/ocis-pkg/registry" + "github.com/micro/cli/v2" - "github.com/micro/go-micro/v2/registry/mdns" tw "github.com/olekukonko/tablewriter" "github.com/owncloud/ocis/settings/pkg/config" "github.com/owncloud/ocis/settings/pkg/flagset" @@ -18,7 +19,7 @@ func PrintVersion(cfg *config.Config) *cli.Command { Usage: "Print the versions of the running instances", Flags: flagset.ListSettingsWithConfig(cfg), Action: func(c *cli.Context) error { - reg := mdns.NewRegistry() + reg := *registry.GetRegistry() services, err := reg.GetService(cfg.GRPC.Namespace + "." + cfg.Service.Name) if err != nil { fmt.Println(fmt.Errorf("could not get settings services from the registry: %v", err)) diff --git a/store/pkg/command/version.go b/store/pkg/command/version.go index 0e90015aa61..ff23342650e 100644 --- a/store/pkg/command/version.go +++ b/store/pkg/command/version.go @@ -4,8 +4,9 @@ import ( "fmt" "os" + "github.com/owncloud/ocis/ocis-pkg/registry" + "github.com/micro/cli/v2" - "github.com/micro/go-micro/v2/registry/mdns" tw "github.com/olekukonko/tablewriter" "github.com/owncloud/ocis/store/pkg/config" "github.com/owncloud/ocis/store/pkg/flagset" @@ -18,7 +19,7 @@ func PrintVersion(cfg *config.Config) *cli.Command { Usage: "Print the versions of the running instances", Flags: flagset.ListStoreWithConfig(cfg), Action: func(c *cli.Context) error { - reg := mdns.NewRegistry() + reg := *registry.GetRegistry() services, err := reg.GetService(cfg.Service.Namespace + "." + cfg.Service.Name) if err != nil { fmt.Println(fmt.Errorf("could not get store services from the registry: %v", err)) diff --git a/thumbnails/pkg/command/version.go b/thumbnails/pkg/command/version.go index 511e52d261e..3a17e44b7f1 100644 --- a/thumbnails/pkg/command/version.go +++ b/thumbnails/pkg/command/version.go @@ -4,8 +4,9 @@ import ( "fmt" "os" + "github.com/owncloud/ocis/ocis-pkg/registry" + "github.com/micro/cli/v2" - "github.com/micro/go-micro/v2/registry/mdns" tw "github.com/olekukonko/tablewriter" "github.com/owncloud/ocis/thumbnails/pkg/config" "github.com/owncloud/ocis/thumbnails/pkg/flagset" @@ -18,7 +19,7 @@ func PrintVersion(cfg *config.Config) *cli.Command { Usage: "Print the versions of the running instances", Flags: flagset.ListThumbnailsWithConfig(cfg), Action: func(c *cli.Context) error { - reg := mdns.NewRegistry() + reg := *registry.GetRegistry() services, err := reg.GetService(cfg.Server.Namespace + "." + cfg.Server.Name) if err != nil { fmt.Println(fmt.Errorf("could not get thumbnails services from the registry: %v", err)) diff --git a/webdav/pkg/command/version.go b/webdav/pkg/command/version.go index 11e694d9e4e..a77dbe3fb5e 100644 --- a/webdav/pkg/command/version.go +++ b/webdav/pkg/command/version.go @@ -4,8 +4,9 @@ import ( "fmt" "os" + "github.com/owncloud/ocis/ocis-pkg/registry" + "github.com/micro/cli/v2" - "github.com/micro/go-micro/v2/registry/mdns" tw "github.com/olekukonko/tablewriter" "github.com/owncloud/ocis/webdav/pkg/config" "github.com/owncloud/ocis/webdav/pkg/flagset" @@ -18,7 +19,7 @@ func PrintVersion(cfg *config.Config) *cli.Command { Usage: "Print the versions of the running instances", Flags: flagset.ListWebdavWithConfig(cfg), Action: func(c *cli.Context) error { - reg := mdns.NewRegistry() + reg := *registry.GetRegistry() services, err := reg.GetService(cfg.Service.Namespace + "." + cfg.Service.Name) if err != nil { fmt.Println(fmt.Errorf("could not get webdav services from the registry: %v", err))