mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-09 13:50:18 -06:00
add store to new config scheme
This commit is contained in:
@@ -2,6 +2,7 @@ package flagset
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/ocis-pkg/flags"
|
||||
"github.com/owncloud/ocis/store/pkg/config"
|
||||
)
|
||||
|
||||
@@ -41,7 +42,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: "0.0.0.0:9460",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9460"),
|
||||
Usage: "Address to debug endpoint",
|
||||
EnvVars: []string{"STORE_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
@@ -60,42 +61,42 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-type",
|
||||
Value: "jaeger",
|
||||
Value: flags.OverrideDefaultString(cfg.Tracing.Type, "jaeger"),
|
||||
Usage: "Tracing backend type",
|
||||
EnvVars: []string{"STORE_TRACING_TYPE"},
|
||||
Destination: &cfg.Tracing.Type,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-endpoint",
|
||||
Value: "",
|
||||
Value: flags.OverrideDefaultString(cfg.Tracing.Endpoint, ""),
|
||||
Usage: "Endpoint for the agent",
|
||||
EnvVars: []string{"STORE_TRACING_ENDPOINT"},
|
||||
Destination: &cfg.Tracing.Endpoint,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-collector",
|
||||
Value: "",
|
||||
Value: flags.OverrideDefaultString(cfg.Tracing.Collector, ""),
|
||||
Usage: "Endpoint for the collector",
|
||||
EnvVars: []string{"STORE_TRACING_COLLECTOR"},
|
||||
Destination: &cfg.Tracing.Collector,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-service",
|
||||
Value: "store",
|
||||
Value: flags.OverrideDefaultString(cfg.Tracing.Service, "store"),
|
||||
Usage: "Service name for tracing",
|
||||
EnvVars: []string{"STORE_TRACING_SERVICE"},
|
||||
Destination: &cfg.Tracing.Service,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: "0.0.0.0:9460",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9460"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"STORE_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "debug-token",
|
||||
Value: "",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Token, ""),
|
||||
Usage: "Token to grant metrics access",
|
||||
EnvVars: []string{"STORE_DEBUG_TOKEN"},
|
||||
Destination: &cfg.Debug.Token,
|
||||
@@ -114,21 +115,21 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "grpc-namespace",
|
||||
Value: "com.owncloud.api",
|
||||
Value: flags.OverrideDefaultString(cfg.Service.Namespace, "com.owncloud.api"),
|
||||
Usage: "Set the base namespace for the grpc namespace",
|
||||
EnvVars: []string{"STORE_GRPC_NAMESPACE"},
|
||||
Destination: &cfg.Service.Namespace,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "name",
|
||||
Value: "store",
|
||||
Value: flags.OverrideDefaultString(cfg.Service.Name, "store"),
|
||||
Usage: "Service name",
|
||||
EnvVars: []string{"STORE_NAME"},
|
||||
Destination: &cfg.Service.Name,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "data-path",
|
||||
Value: "/var/tmp/ocis/store",
|
||||
Value: flags.OverrideDefaultString(cfg.Datapath, "/var/tmp/ocis/store"),
|
||||
Usage: "location of the store data path",
|
||||
EnvVars: []string{"STORE_DATA_PATH"},
|
||||
Destination: &cfg.Datapath,
|
||||
@@ -140,14 +141,14 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
func ListStoreWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{&cli.StringFlag{
|
||||
Name: "grpc-namespace",
|
||||
Value: "com.owncloud.api",
|
||||
Value: flags.OverrideDefaultString(cfg.Service.Namespace, "com.owncloud.api"),
|
||||
Usage: "Set the base namespace for the grpc namespace",
|
||||
EnvVars: []string{"STORE_GRPC_NAMESPACE"},
|
||||
Destination: &cfg.Service.Namespace,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "name",
|
||||
Value: "store",
|
||||
Value: flags.OverrideDefaultString(cfg.Service.Name, "store"),
|
||||
Usage: "Service name",
|
||||
EnvVars: []string{"STORE_NAME"},
|
||||
Destination: &cfg.Service.Name,
|
||||
|
||||
Reference in New Issue
Block a user