add version command and add build information to metrics

Signed-off-by: David Christofas <dchristofas@owncloud.com>
This commit is contained in:
David Christofas
2020-09-25 16:41:02 +02:00
parent cae6a1c3ac
commit 116ba347e9
14 changed files with 129 additions and 20 deletions
+1 -2
View File
@@ -4,7 +4,6 @@ import (
"github.com/owncloud/ocis/ocis-pkg/service/grpc"
"github.com/owncloud/ocis/settings/pkg/proto/v0"
svc "github.com/owncloud/ocis/settings/pkg/service/v0"
"github.com/owncloud/ocis/settings/pkg/version"
)
// Server initializes a new go-micro service ready to run
@@ -14,7 +13,7 @@ func Server(opts ...Option) grpc.Service {
service := grpc.NewService(
grpc.Logger(options.Logger),
grpc.Name(options.Name),
grpc.Version(version.String),
grpc.Version(options.Config.Service.Version),
grpc.Address(options.Config.GRPC.Addr),
grpc.Namespace(options.Config.GRPC.Namespace),
grpc.Context(options.Context),
+1 -1
View File
@@ -18,7 +18,7 @@ func Server(opts ...Option) http.Service {
service := http.NewService(
http.Logger(options.Logger),
http.Name(options.Name),
http.Version(version.String),
http.Version(options.Config.Service.Version),
http.Address(options.Config.HTTP.Addr),
http.Namespace(options.Config.HTTP.Namespace),
http.Context(options.Context),