make version command registry aware
This commit is contained in:
8 files changed
+24
-16
No files matched your search
@@ -4,8 +4,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"github.com/owncloud/ocis/ocis-pkg/registry"
|
||||||
|
|
||||||
"github.com/micro/cli/v2"
|
"github.com/micro/cli/v2"
|
||||||
"github.com/micro/go-micro/v2/registry/mdns"
|
|
||||||
tw "github.com/olekukonko/tablewriter"
|
tw "github.com/olekukonko/tablewriter"
|
||||||
"github.com/owncloud/ocis/accounts/pkg/config"
|
"github.com/owncloud/ocis/accounts/pkg/config"
|
||||||
"github.com/owncloud/ocis/accounts/pkg/flagset"
|
"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",
|
Usage: "Print the versions of the running instances",
|
||||||
Flags: flagset.ListAccountsWithConfig(cfg),
|
Flags: flagset.ListAccountsWithConfig(cfg),
|
||||||
Action: func(c *cli.Context) error {
|
Action: func(c *cli.Context) error {
|
||||||
reg := mdns.NewRegistry()
|
reg := *registry.GetRegistry()
|
||||||
services, err := reg.GetService(cfg.GRPC.Namespace + "." + cfg.Server.Name)
|
services, err := reg.GetService(cfg.GRPC.Namespace + "." + cfg.Server.Name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(fmt.Errorf("could not get accounts services from the registry: %v", err))
|
fmt.Println(fmt.Errorf("could not get accounts services from the registry: %v", err))
|
||||||
|
|||||||
@@ -4,8 +4,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"github.com/owncloud/ocis/ocis-pkg/registry"
|
||||||
|
|
||||||
"github.com/micro/cli/v2"
|
"github.com/micro/cli/v2"
|
||||||
"github.com/micro/go-micro/v2/registry/mdns"
|
|
||||||
tw "github.com/olekukonko/tablewriter"
|
tw "github.com/olekukonko/tablewriter"
|
||||||
"github.com/owncloud/ocis/konnectd/pkg/config"
|
"github.com/owncloud/ocis/konnectd/pkg/config"
|
||||||
"github.com/owncloud/ocis/konnectd/pkg/flagset"
|
"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",
|
Usage: "Print the versions of the running instances",
|
||||||
Flags: flagset.ListKonnectdWithConfig(cfg),
|
Flags: flagset.ListKonnectdWithConfig(cfg),
|
||||||
Action: func(c *cli.Context) error {
|
Action: func(c *cli.Context) error {
|
||||||
reg := mdns.NewRegistry()
|
reg := *registry.GetRegistry()
|
||||||
services, err := reg.GetService(cfg.Service.Namespace + "." + cfg.Service.Name)
|
services, err := reg.GetService(cfg.Service.Namespace + "." + cfg.Service.Name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(fmt.Errorf("could not get konnectd services from the registry: %v", err))
|
fmt.Println(fmt.Errorf("could not get konnectd services from the registry: %v", err))
|
||||||
|
|||||||
@@ -4,8 +4,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"github.com/owncloud/ocis/ocis-pkg/registry"
|
||||||
|
|
||||||
"github.com/micro/cli/v2"
|
"github.com/micro/cli/v2"
|
||||||
"github.com/micro/go-micro/v2/registry/mdns"
|
|
||||||
tw "github.com/olekukonko/tablewriter"
|
tw "github.com/olekukonko/tablewriter"
|
||||||
"github.com/owncloud/ocis/ocs/pkg/config"
|
"github.com/owncloud/ocis/ocs/pkg/config"
|
||||||
"github.com/owncloud/ocis/ocs/pkg/flagset"
|
"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",
|
Usage: "Print the versions of the running instances",
|
||||||
Flags: flagset.ListOcsWithConfig(cfg),
|
Flags: flagset.ListOcsWithConfig(cfg),
|
||||||
Action: func(c *cli.Context) error {
|
Action: func(c *cli.Context) error {
|
||||||
reg := mdns.NewRegistry()
|
reg := *registry.GetRegistry()
|
||||||
services, err := reg.GetService(cfg.Service.Namespace + "." + cfg.Service.Name)
|
services, err := reg.GetService(cfg.Service.Namespace + "." + cfg.Service.Name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(fmt.Errorf("could not get ocs services from the registry: %v", err))
|
fmt.Println(fmt.Errorf("could not get ocs services from the registry: %v", err))
|
||||||
|
|||||||
@@ -4,8 +4,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"github.com/owncloud/ocis/ocis-pkg/registry"
|
||||||
|
|
||||||
"github.com/micro/cli/v2"
|
"github.com/micro/cli/v2"
|
||||||
"github.com/micro/go-micro/v2/registry/mdns"
|
|
||||||
tw "github.com/olekukonko/tablewriter"
|
tw "github.com/olekukonko/tablewriter"
|
||||||
"github.com/owncloud/ocis/proxy/pkg/config"
|
"github.com/owncloud/ocis/proxy/pkg/config"
|
||||||
"github.com/owncloud/ocis/proxy/pkg/flagset"
|
"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",
|
Usage: "Print the versions of the running instances",
|
||||||
Flags: flagset.ListProxyWithConfig(cfg),
|
Flags: flagset.ListProxyWithConfig(cfg),
|
||||||
Action: func(c *cli.Context) error {
|
Action: func(c *cli.Context) error {
|
||||||
reg := mdns.NewRegistry()
|
reg := *registry.GetRegistry()
|
||||||
services, err := reg.GetService(cfg.Service.Namespace + "." + cfg.Service.Name)
|
services, err := reg.GetService(cfg.Service.Namespace + "." + cfg.Service.Name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(fmt.Errorf("could not get proxy services from the registry: %v", err))
|
fmt.Println(fmt.Errorf("could not get proxy services from the registry: %v", err))
|
||||||
|
|||||||
@@ -4,8 +4,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"github.com/owncloud/ocis/ocis-pkg/registry"
|
||||||
|
|
||||||
"github.com/micro/cli/v2"
|
"github.com/micro/cli/v2"
|
||||||
"github.com/micro/go-micro/v2/registry/mdns"
|
|
||||||
tw "github.com/olekukonko/tablewriter"
|
tw "github.com/olekukonko/tablewriter"
|
||||||
"github.com/owncloud/ocis/settings/pkg/config"
|
"github.com/owncloud/ocis/settings/pkg/config"
|
||||||
"github.com/owncloud/ocis/settings/pkg/flagset"
|
"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",
|
Usage: "Print the versions of the running instances",
|
||||||
Flags: flagset.ListSettingsWithConfig(cfg),
|
Flags: flagset.ListSettingsWithConfig(cfg),
|
||||||
Action: func(c *cli.Context) error {
|
Action: func(c *cli.Context) error {
|
||||||
reg := mdns.NewRegistry()
|
reg := *registry.GetRegistry()
|
||||||
services, err := reg.GetService(cfg.GRPC.Namespace + "." + cfg.Service.Name)
|
services, err := reg.GetService(cfg.GRPC.Namespace + "." + cfg.Service.Name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(fmt.Errorf("could not get settings services from the registry: %v", err))
|
fmt.Println(fmt.Errorf("could not get settings services from the registry: %v", err))
|
||||||
|
|||||||
@@ -4,8 +4,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"github.com/owncloud/ocis/ocis-pkg/registry"
|
||||||
|
|
||||||
"github.com/micro/cli/v2"
|
"github.com/micro/cli/v2"
|
||||||
"github.com/micro/go-micro/v2/registry/mdns"
|
|
||||||
tw "github.com/olekukonko/tablewriter"
|
tw "github.com/olekukonko/tablewriter"
|
||||||
"github.com/owncloud/ocis/store/pkg/config"
|
"github.com/owncloud/ocis/store/pkg/config"
|
||||||
"github.com/owncloud/ocis/store/pkg/flagset"
|
"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",
|
Usage: "Print the versions of the running instances",
|
||||||
Flags: flagset.ListStoreWithConfig(cfg),
|
Flags: flagset.ListStoreWithConfig(cfg),
|
||||||
Action: func(c *cli.Context) error {
|
Action: func(c *cli.Context) error {
|
||||||
reg := mdns.NewRegistry()
|
reg := *registry.GetRegistry()
|
||||||
services, err := reg.GetService(cfg.Service.Namespace + "." + cfg.Service.Name)
|
services, err := reg.GetService(cfg.Service.Namespace + "." + cfg.Service.Name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(fmt.Errorf("could not get store services from the registry: %v", err))
|
fmt.Println(fmt.Errorf("could not get store services from the registry: %v", err))
|
||||||
|
|||||||
@@ -4,8 +4,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"github.com/owncloud/ocis/ocis-pkg/registry"
|
||||||
|
|
||||||
"github.com/micro/cli/v2"
|
"github.com/micro/cli/v2"
|
||||||
"github.com/micro/go-micro/v2/registry/mdns"
|
|
||||||
tw "github.com/olekukonko/tablewriter"
|
tw "github.com/olekukonko/tablewriter"
|
||||||
"github.com/owncloud/ocis/thumbnails/pkg/config"
|
"github.com/owncloud/ocis/thumbnails/pkg/config"
|
||||||
"github.com/owncloud/ocis/thumbnails/pkg/flagset"
|
"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",
|
Usage: "Print the versions of the running instances",
|
||||||
Flags: flagset.ListThumbnailsWithConfig(cfg),
|
Flags: flagset.ListThumbnailsWithConfig(cfg),
|
||||||
Action: func(c *cli.Context) error {
|
Action: func(c *cli.Context) error {
|
||||||
reg := mdns.NewRegistry()
|
reg := *registry.GetRegistry()
|
||||||
services, err := reg.GetService(cfg.Server.Namespace + "." + cfg.Server.Name)
|
services, err := reg.GetService(cfg.Server.Namespace + "." + cfg.Server.Name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(fmt.Errorf("could not get thumbnails services from the registry: %v", err))
|
fmt.Println(fmt.Errorf("could not get thumbnails services from the registry: %v", err))
|
||||||
|
|||||||
@@ -4,8 +4,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"github.com/owncloud/ocis/ocis-pkg/registry"
|
||||||
|
|
||||||
"github.com/micro/cli/v2"
|
"github.com/micro/cli/v2"
|
||||||
"github.com/micro/go-micro/v2/registry/mdns"
|
|
||||||
tw "github.com/olekukonko/tablewriter"
|
tw "github.com/olekukonko/tablewriter"
|
||||||
"github.com/owncloud/ocis/webdav/pkg/config"
|
"github.com/owncloud/ocis/webdav/pkg/config"
|
||||||
"github.com/owncloud/ocis/webdav/pkg/flagset"
|
"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",
|
Usage: "Print the versions of the running instances",
|
||||||
Flags: flagset.ListWebdavWithConfig(cfg),
|
Flags: flagset.ListWebdavWithConfig(cfg),
|
||||||
Action: func(c *cli.Context) error {
|
Action: func(c *cli.Context) error {
|
||||||
reg := mdns.NewRegistry()
|
reg := *registry.GetRegistry()
|
||||||
services, err := reg.GetService(cfg.Service.Namespace + "." + cfg.Service.Name)
|
services, err := reg.GetService(cfg.Service.Namespace + "." + cfg.Service.Name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(fmt.Errorf("could not get webdav services from the registry: %v", err))
|
fmt.Println(fmt.Errorf("could not get webdav services from the registry: %v", err))
|
||||||
|
|||||||
Reference in new issue
Block a user