mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-23 20:49:13 -05:00
add version command and add build information to metrics
Signed-off-by: David Christofas <dchristofas@owncloud.com>
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user