mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-03 13:43:16 -04:00
enable phoenix on the reserved port
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/owncloud/ocis-phoenix/pkg/metrics"
|
||||
"github.com/owncloud/ocis-phoenix/pkg/server/http"
|
||||
"github.com/owncloud/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/pkg/register"
|
||||
)
|
||||
|
||||
// PhoenixCommand is the entrypoint for the phoenix command.
|
||||
@@ -31,7 +32,7 @@ func PhoenixCommand(cfg *config.Config) cli.Command {
|
||||
}
|
||||
|
||||
// PhoenixHandler defines the direct server handler.
|
||||
func PhoenixHandler(ctx context.Context, cancel context.CancelFunc, gr run.Group, cfg *config.Config) error {
|
||||
func PhoenixHandler(ctx context.Context, cancel context.CancelFunc, gr *run.Group, cfg *config.Config) error {
|
||||
scfg := configurePhoenix(cfg)
|
||||
logger := command.NewLogger(scfg)
|
||||
m := metrics.New()
|
||||
@@ -72,12 +73,13 @@ func configurePhoenix(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Phoenix.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Phoenix.Log.Color = cfg.Log.Color
|
||||
cfg.Phoenix.Tracing.Enabled = false
|
||||
cfg.Phoenix.HTTP.Addr = "localhost:9100"
|
||||
cfg.Phoenix.HTTP.Root = "/"
|
||||
|
||||
return cfg.Phoenix
|
||||
}
|
||||
|
||||
// func init() {
|
||||
// register.AddCommand(PhoenixCommand)
|
||||
// register.AddHandler(PhoenixHandler)
|
||||
// }
|
||||
func init() {
|
||||
register.AddCommand(PhoenixCommand)
|
||||
register.AddHandler(PhoenixHandler)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user