remove version from service config

This commit is contained in:
Willy Kloucek
2022-01-03 16:24:39 +01:00
parent 55bf175bea
commit 3d4df5796a
40 changed files with 70 additions and 58 deletions
+2 -1
View File
@@ -5,6 +5,7 @@ import (
"github.com/oklog/run"
"github.com/owncloud/ocis/ocis-pkg/version"
"github.com/owncloud/ocis/store/pkg/config"
"github.com/owncloud/ocis/store/pkg/config/parser"
"github.com/owncloud/ocis/store/pkg/logging"
@@ -47,7 +48,7 @@ func Server(cfg *config.Config) *cli.Command {
defer cancel()
metrics.BuildInfo.WithLabelValues(cfg.Service.Version).Set(1)
metrics.BuildInfo.WithLabelValues(version.String).Set(1)
{
server := grpc.Server(
+1 -2
View File
@@ -2,6 +2,5 @@ package config
// Service defines the available service configuration.
type Service struct {
Name string
Version string
Name string
}
+2 -1
View File
@@ -5,6 +5,7 @@ import (
"net/http"
"github.com/owncloud/ocis/ocis-pkg/service/debug"
"github.com/owncloud/ocis/ocis-pkg/version"
"github.com/owncloud/ocis/store/pkg/config"
)
@@ -15,7 +16,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),
+2 -1
View File
@@ -2,6 +2,7 @@ package grpc
import (
"github.com/owncloud/ocis/ocis-pkg/service/grpc"
"github.com/owncloud/ocis/ocis-pkg/version"
"github.com/owncloud/ocis/store/pkg/proto/v0"
svc "github.com/owncloud/ocis/store/pkg/service/v0"
)
@@ -13,7 +14,7 @@ func Server(opts ...Option) grpc.Service {
service := grpc.NewService(
grpc.Namespace(options.Config.GRPC.Namespace),
grpc.Name(options.Config.Service.Name),
grpc.Version(options.Config.Service.Version),
grpc.Version(version.String),
grpc.Context(options.Context),
grpc.Address(options.Config.GRPC.Addr),
grpc.Logger(options.Logger),