remove version from service config
This commit is contained in:
committed by
Jörn Friedrich Dreyer
parent
b9f2b6b91e
commit
adc7b3b3d2
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/ocis-pkg/version"
|
||||
"github.com/owncloud/ocis/settings/pkg/config"
|
||||
"github.com/owncloud/ocis/settings/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/settings/pkg/logging"
|
||||
@@ -44,7 +45,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
defer cancel()
|
||||
|
||||
mtrcs := metrics.New()
|
||||
mtrcs.BuildInfo.WithLabelValues(cfg.Service.Version).Set(1)
|
||||
mtrcs.BuildInfo.WithLabelValues(version.String).Set(1)
|
||||
|
||||
// prepare an HTTP server and add it to the group run.
|
||||
httpServer := http.Server(
|
||||
|
||||
@@ -2,6 +2,5 @@ package config
|
||||
|
||||
// Service defines the available service configuration.
|
||||
type Service struct {
|
||||
Name string
|
||||
Version string
|
||||
Name string
|
||||
}
|
||||
|
||||
@@ -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/settings/pkg/proto/v0"
|
||||
svc "github.com/owncloud/ocis/settings/pkg/service/v0"
|
||||
)
|
||||
@@ -13,7 +14,7 @@ func Server(opts ...Option) grpc.Service {
|
||||
service := grpc.NewService(
|
||||
grpc.Logger(options.Logger),
|
||||
grpc.Name(options.Name),
|
||||
grpc.Version(options.Config.Service.Version),
|
||||
grpc.Version(version.String),
|
||||
grpc.Address(options.Config.GRPC.Addr),
|
||||
grpc.Namespace(options.Config.GRPC.Namespace),
|
||||
grpc.Context(options.Context),
|
||||
|
||||
@@ -21,7 +21,7 @@ func Server(opts ...Option) http.Service {
|
||||
service := http.NewService(
|
||||
http.Logger(options.Logger),
|
||||
http.Name(options.Name),
|
||||
http.Version(options.Config.Service.Version),
|
||||
http.Version(version.String),
|
||||
http.Address(options.Config.HTTP.Addr),
|
||||
http.Namespace(options.Config.HTTP.Namespace),
|
||||
http.Context(options.Context),
|
||||
|
||||
Reference in New Issue
Block a user