update micro deps to v2

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2020-02-11 10:33:18 +01:00
parent 06ef8d528b
commit c2c12fd655
31 changed files with 305 additions and 190 deletions
+22 -20
View File
@@ -1,7 +1,7 @@
package flagset
import (
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/pkg/config"
)
@@ -12,26 +12,28 @@ func RootWithConfig(cfg *config.Config) []cli.Flag {
Name: "config-file",
Value: "",
Usage: "Path to config file",
EnvVar: "OCIS_CONFIG_FILE",
EnvVars: []string{"OCIS_CONFIG_FILE"},
Destination: &cfg.File,
},
&cli.StringFlag{
Name: "log-level",
Value: "info",
Usage: "Set logging level",
EnvVar: "OCIS_LOG_LEVEL",
EnvVars: []string{"OCIS_LOG_LEVEL"},
Destination: &cfg.Log.Level,
},
&cli.BoolTFlag{
&cli.BoolFlag{
Value: true,
Name: "log-pretty",
Usage: "Enable pretty logging",
EnvVar: "OCIS_LOG_PRETTY",
EnvVars: []string{"OCIS_LOG_PRETTY"},
Destination: &cfg.Log.Pretty,
},
&cli.BoolTFlag{
&cli.BoolFlag{
Value: true,
Name: "log-color",
Usage: "Enable colored logging",
EnvVar: "OCIS_LOG_COLOR",
EnvVars: []string{"OCIS_LOG_COLOR"},
Destination: &cfg.Log.Color,
},
}
@@ -44,7 +46,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9010",
Usage: "Address to debug endpoint",
EnvVar: "OCIS_DEBUG_ADDR",
EnvVars: []string{"OCIS_DEBUG_ADDR"},
Destination: &cfg.Debug.Addr,
},
}
@@ -56,82 +58,82 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
&cli.BoolFlag{
Name: "tracing-enabled",
Usage: "Enable sending traces",
EnvVar: "OCIS_TRACING_ENABLED",
EnvVars: []string{"OCIS_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled,
},
&cli.StringFlag{
Name: "tracing-type",
Value: "jaeger",
Usage: "Tracing backend type",
EnvVar: "OCIS_TRACING_TYPE",
EnvVars: []string{"OCIS_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
&cli.StringFlag{
Name: "tracing-endpoint",
Value: "",
Usage: "Endpoint for the agent",
EnvVar: "OCIS_TRACING_ENDPOINT",
EnvVars: []string{"OCIS_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
&cli.StringFlag{
Name: "tracing-collector",
Value: "",
Usage: "Endpoint for the collector",
EnvVar: "OCIS_TRACING_COLLECTOR",
EnvVars: []string{"OCIS_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
&cli.StringFlag{
Name: "tracing-service",
Value: "hello",
Usage: "Service name for tracing",
EnvVar: "OCIS_TRACING_SERVICE",
EnvVars: []string{"OCIS_TRACING_SERVICE"},
Destination: &cfg.Tracing.Service,
},
&cli.StringFlag{
Name: "debug-addr",
Value: "0.0.0.0:9010",
Usage: "Address to bind debug server",
EnvVar: "OCIS_DEBUG_ADDR",
EnvVars: []string{"OCIS_DEBUG_ADDR"},
Destination: &cfg.Debug.Addr,
},
&cli.StringFlag{
Name: "debug-token",
Value: "",
Usage: "Token to grant metrics access",
EnvVar: "OCIS_DEBUG_TOKEN",
EnvVars: []string{"OCIS_DEBUG_TOKEN"},
Destination: &cfg.Debug.Token,
},
&cli.BoolFlag{
Name: "debug-pprof",
Usage: "Enable pprof debugging",
EnvVar: "OCIS_DEBUG_PPROF",
EnvVars: []string{"OCIS_DEBUG_PPROF"},
Destination: &cfg.Debug.Pprof,
},
&cli.BoolFlag{
Name: "debug-zpages",
Usage: "Enable zpages debugging",
EnvVar: "OCIS_DEBUG_ZPAGES",
EnvVars: []string{"OCIS_DEBUG_ZPAGES"},
Destination: &cfg.Debug.Zpages,
},
&cli.StringFlag{
Name: "http-addr",
Value: "0.0.0.0:9000",
Usage: "Address to bind http server",
EnvVar: "OCIS_HTTP_ADDR",
EnvVars: []string{"OCIS_HTTP_ADDR"},
Destination: &cfg.HTTP.Addr,
},
&cli.StringFlag{
Name: "http-root",
Value: "/",
Usage: "Root path of http server",
EnvVar: "OCIS_HTTP_ROOT",
EnvVars: []string{"OCIS_HTTP_ROOT"},
Destination: &cfg.HTTP.Root,
},
&cli.StringFlag{
Name: "grpc-addr",
Value: "0.0.0.0:9001",
Usage: "Address to bind grpc server",
EnvVar: "OCIS_GRPC_ADDR",
EnvVars: []string{"OCIS_GRPC_ADDR"},
Destination: &cfg.GRPC.Addr,
},
}