mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-04 11:19:39 -06:00
The descriptions make it clearer that the services actually represent a mount point in the combined storage. Each mount point can have a different driver.
51 lines
1.3 KiB
Go
51 lines
1.3 KiB
Go
// +build !simple
|
|
|
|
package command
|
|
|
|
import (
|
|
"github.com/micro/cli/v2"
|
|
"github.com/owncloud/ocis-reva/pkg/command"
|
|
svcconfig "github.com/owncloud/ocis-reva/pkg/config"
|
|
"github.com/owncloud/ocis-reva/pkg/flagset"
|
|
"github.com/owncloud/ocis/pkg/config"
|
|
"github.com/owncloud/ocis/pkg/register"
|
|
)
|
|
|
|
// RevaStorageOCDataCommand is the entrypoint for the reva-storage-oc-data command.
|
|
func RevaStorageOCDataCommand(cfg *config.Config) *cli.Command {
|
|
return &cli.Command{
|
|
Name: "reva-storage-oc-data",
|
|
Usage: "Start reva storage data provider for oc mount",
|
|
Category: "Extensions",
|
|
Flags: flagset.StorageOCDataWithConfig(cfg.Reva),
|
|
Action: func(c *cli.Context) error {
|
|
scfg := configureRevaStorageOCData(cfg)
|
|
|
|
return cli.HandleAction(
|
|
command.StorageOCData(scfg).Action,
|
|
c,
|
|
)
|
|
},
|
|
}
|
|
}
|
|
|
|
func configureRevaStorageOCData(cfg *config.Config) *svcconfig.Config {
|
|
cfg.Reva.Log.Level = cfg.Log.Level
|
|
cfg.Reva.Log.Pretty = cfg.Log.Pretty
|
|
cfg.Reva.Log.Color = cfg.Log.Color
|
|
|
|
if cfg.Tracing.Enabled {
|
|
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
|
|
cfg.Reva.Tracing.Type = cfg.Tracing.Type
|
|
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
|
|
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
|
|
cfg.Reva.Tracing.Service = cfg.Tracing.Service
|
|
}
|
|
|
|
return cfg.Reva
|
|
}
|
|
|
|
func init() {
|
|
register.AddCommand(RevaStorageOCDataCommand)
|
|
}
|