remove version from service config

This commit is contained in:
Willy Kloucek
2022-01-03 16:24:39 +01:00
committed by Jörn Friedrich Dreyer
parent b9f2b6b91e
commit adc7b3b3d2
40 changed files with 70 additions and 58 deletions

View File

@@ -15,6 +15,7 @@ import (
"github.com/owncloud/ocis/ocis-pkg/log"
pkgmiddleware "github.com/owncloud/ocis/ocis-pkg/middleware"
"github.com/owncloud/ocis/ocis-pkg/service/grpc"
"github.com/owncloud/ocis/ocis-pkg/version"
"github.com/owncloud/ocis/proxy/pkg/config"
"github.com/owncloud/ocis/proxy/pkg/config/parser"
"github.com/owncloud/ocis/proxy/pkg/cs3"
@@ -64,7 +65,7 @@ func Server(cfg *config.Config) *cli.Command {
defer cancel()
m.BuildInfo.WithLabelValues(cfg.Service.Version).Set(1)
m.BuildInfo.WithLabelValues(version.String).Set(1)
rp := proxy.NewMultiHostReverseProxy(
proxy.Logger(logger),

View File

@@ -2,6 +2,5 @@ package config
// Service defines the available service configuration.
type Service struct {
Name string
Version string
Name string
}

View File

@@ -6,6 +6,7 @@ import (
"net/http"
"github.com/owncloud/ocis/ocis-pkg/service/debug"
"github.com/owncloud/ocis/ocis-pkg/version"
"github.com/owncloud/ocis/proxy/pkg/config"
)
@@ -16,7 +17,7 @@ func Server(opts ...Option) (*http.Server, error) {
return debug.NewService(
debug.Logger(options.Logger),
debug.Name(options.Config.Service.Name),
debug.Version(options.Config.Service.Version),
debug.Version(version.String),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -6,6 +6,7 @@ import (
pkgcrypto "github.com/owncloud/ocis/ocis-pkg/crypto"
svc "github.com/owncloud/ocis/ocis-pkg/service/http"
"github.com/owncloud/ocis/ocis-pkg/version"
"go-micro.dev/v4"
)
@@ -43,7 +44,7 @@ func Server(opts ...Option) (svc.Service, error) {
service := svc.NewService(
svc.Name(options.Config.Service.Name),
svc.Version(options.Config.Service.Version),
svc.Version(version.String),
svc.TLSConfig(tlsConfig),
svc.Logger(options.Logger),
svc.Address(options.Config.HTTP.Addr),