remove version from service config
This commit is contained in:
committed by
Jörn Friedrich Dreyer
parent
b9f2b6b91e
commit
adc7b3b3d2
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/ocis-pkg/version"
|
||||
"github.com/owncloud/ocis/thumbnails/pkg/config"
|
||||
"github.com/owncloud/ocis/thumbnails/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/thumbnails/pkg/logging"
|
||||
@@ -46,7 +47,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)
|
||||
|
||||
service := grpc.NewService(
|
||||
grpc.Logger(logger),
|
||||
|
||||
@@ -2,6 +2,5 @@ package config
|
||||
|
||||
// Service defines the available service configuration.
|
||||
type Service struct {
|
||||
Name string
|
||||
Version string
|
||||
Name string
|
||||
}
|
||||
|
||||
@@ -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/thumbnails/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),
|
||||
|
||||
@@ -22,7 +22,7 @@ func NewService(opts ...Option) grpc.Service {
|
||||
grpc.Address(options.Address),
|
||||
grpc.Context(options.Context),
|
||||
grpc.Flags(options.Flags...),
|
||||
grpc.Version(options.Config.Service.Version),
|
||||
grpc.Version(version.String),
|
||||
)
|
||||
tconf := options.Config.Thumbnail
|
||||
gc, err := pool.GetGatewayServiceClient(tconf.RevaGateway)
|
||||
|
||||
Reference in New Issue
Block a user