fix version info

This commit is contained in:
Willy Kloucek
2022-06-13 10:41:14 +02:00
parent 588293fd19
commit 68a6f43538
93 changed files with 112 additions and 102 deletions

View File

@@ -0,0 +1,10 @@
Bugfix: Fix version info
We've fixed the version info that is displayed when you run:
- `ocis version`
- `ocis <extension name> version`
Since #2918, these commands returned an empty version only.
https://github.com/owncloud/ocis/pull/3953

View File

@@ -85,7 +85,7 @@ func Server(cfg *config.Config) *cli.Command {
cfg.GRPC.Namespace+"."+cfg.Service.Name,
uuid.Must(uuid.NewV4()).String(),
cfg.GRPC.Addr,
version.String,
version.GetString(),
logger,
); err != nil {
logger.Fatal().Err(err).Msg("failed to register the grpc endpoint")

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -16,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(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -80,7 +80,7 @@ func Server(cfg *config.Config) *cli.Command {
cfg.GRPC.Namespace+"."+cfg.Service.Name,
uuid.Must(uuid.NewV4()).String(),
cfg.GRPC.Addr,
version.String,
version.GetString(),
logger,
); err != nil {
logger.Fatal().Err(err).Msg("failed to register the grpc endpoint")

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -16,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(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -98,7 +98,7 @@ func Server(cfg *config.Config) *cli.Command {
cfg.GRPC.Namespace+"."+cfg.Service.Name,
uuid.Must(uuid.NewV4()).String(),
cfg.GRPC.Addr,
version.String,
version.GetString(),
logger,
); err != nil {
logger.Fatal().Err(err).Msg("failed to register the grpc endpoint")

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -16,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(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -85,7 +85,7 @@ func Server(cfg *config.Config) *cli.Command {
cfg.GRPC.Namespace+"."+cfg.Service.Name,
uuid.Must(uuid.NewV4()).String(),
cfg.GRPC.Addr,
version.String,
version.GetString(),
logger,
); err != nil {
logger.Fatal().Err(err).Msg("failed to register the grpc endpoint")

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -16,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(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -85,7 +85,7 @@ func Server(cfg *config.Config) *cli.Command {
cfg.GRPC.Namespace+"."+cfg.Service.Name,
uuid.Must(uuid.NewV4()).String(),
cfg.GRPC.Addr,
version.String,
version.GetString(),
logger,
); err != nil {
logger.Fatal().Err(err).Msg("failed to register the grpc endpoint")

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -16,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(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -85,7 +85,7 @@ func Server(cfg *config.Config) *cli.Command {
cfg.HTTP.Namespace+"."+cfg.Service.Name,
uuid.Must(uuid.NewV4()).String(),
cfg.HTTP.Addr,
version.String,
version.GetString(),
logger,
); err != nil {
logger.Fatal().Err(err).Msg("failed to register the http endpoint")

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -16,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(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -80,7 +80,7 @@ func Server(cfg *config.Config) *cli.Command {
cfg.GRPC.Namespace+"."+cfg.Service.Name,
uuid.Must(uuid.NewV4()).String(),
cfg.GRPC.Addr,
version.String,
version.GetString(),
logger,
); err != nil {
logger.Fatal().Err(err).Msg("failed to register the grpc endpoint")

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -16,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(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -50,7 +50,7 @@ func Server(cfg *config.Config) *cli.Command {
defer cancel()
mtrcs.BuildInfo.WithLabelValues(version.String).Set(1)
mtrcs.BuildInfo.WithLabelValues(version.GetString()).Set(1)
{
server, err := http.Server(

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -16,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(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -17,7 +17,7 @@ func Server(opts ...Option) (http.Service, error) {
http.Logger(options.Logger),
http.Namespace(options.Namespace),
http.Name("graph-explorer"),
http.Version(version.String),
http.Version(version.GetString()),
http.Address(options.Config.HTTP.Addr),
http.Context(options.Context),
http.Flags(options.Flags...),
@@ -33,7 +33,7 @@ func Server(opts ...Option) (http.Service, error) {
middleware.Secure,
middleware.Version(
"graph-explorer",
version.String,
version.GetString(),
),
middleware.Logger(
options.Logger,

View File

@@ -49,7 +49,7 @@ func Server(cfg *config.Config) *cli.Command {
defer cancel()
mtrcs.BuildInfo.WithLabelValues(version.String).Set(1)
mtrcs.BuildInfo.WithLabelValues(version.GetString()).Set(1)
{
server, err := http.Server(

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -16,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(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -22,7 +22,7 @@ func Server(opts ...Option) (http.Service, error) {
http.Logger(options.Logger),
http.Namespace(options.Config.HTTP.Namespace),
http.Name("graph"),
http.Version(version.String),
http.Version(version.GetString()),
http.Address(options.Config.HTTP.Addr),
http.Context(options.Context),
http.Flags(options.Flags...),
@@ -46,7 +46,7 @@ func Server(opts ...Option) (http.Service, error) {
chimiddleware.RequestID,
middleware.Version(
"graph",
version.String,
version.GetString(),
),
middleware.Logger(
options.Logger,

View File

@@ -98,7 +98,7 @@ func Server(cfg *config.Config) *cli.Command {
cfg.GRPC.Namespace+"."+cfg.Service.Name,
uuid.Must(uuid.NewV4()).String(),
cfg.GRPC.Addr,
version.String,
version.GetString(),
logger,
); err != nil {
logger.Fatal().Err(err).Msg("failed to register the grpc endpoint")

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -16,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(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -16,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(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -50,7 +50,7 @@ func Server(cfg *config.Config) *cli.Command {
defer cancel()
metrics.BuildInfo.WithLabelValues(version.String).Set(1)
metrics.BuildInfo.WithLabelValues(version.GetString()).Set(1)
{
server, err := http.Server(

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -19,7 +19,7 @@ func Server(opts ...Option) (*http.Server, error) {
return debug.NewService(
debug.Logger(options.Logger),
debug.Name(options.Config.Service.Name),
debug.Version(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -43,7 +43,7 @@ func Server(opts ...Option) (http.Service, error) {
http.Logger(options.Logger),
http.Namespace(options.Config.HTTP.Namespace),
http.Name(options.Config.Service.Name),
http.Version(version.String),
http.Version(version.GetString()),
http.Address(options.Config.HTTP.Addr),
http.Context(options.Context),
http.Flags(options.Flags...),
@@ -61,7 +61,7 @@ func Server(opts ...Option) (http.Service, error) {
middleware.Secure,
middleware.Version(
options.Config.Service.Name,
version.String,
version.GetString(),
),
middleware.Logger(
options.Logger,

View File

@@ -44,7 +44,7 @@ func Server(cfg *config.Config) *cli.Command {
gr.Add(func() error {
s, err := ocdav.Service(
ocdav.Name(cfg.HTTP.Namespace+"."+cfg.Service.Name),
ocdav.Version(version.String),
ocdav.Version(version.GetString()),
ocdav.Context(ctx),
ocdav.Logger(logger.Logger),
ocdav.Address(cfg.HTTP.Addr),

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -16,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(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -52,7 +52,7 @@ func Server(cfg *config.Config) *cli.Command {
defer cancel()
metrics.BuildInfo.WithLabelValues(version.String).Set(1)
metrics.BuildInfo.WithLabelValues(version.GetString()).Set(1)
{
server, err := http.Server(

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -16,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(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -18,7 +18,7 @@ func Server(opts ...Option) (http.Service, error) {
service := http.NewService(
http.Logger(options.Logger),
http.Name(options.Config.Service.Name),
http.Version(version.String),
http.Version(version.GetString()),
http.Namespace(options.Config.HTTP.Namespace),
http.Address(options.Config.HTTP.Addr),
http.Context(options.Context),
@@ -42,7 +42,7 @@ func Server(opts ...Option) (http.Service, error) {
middleware.Secure,
middleware.Version(
options.Config.Service.Name,
version.String,
version.GetString(),
),
middleware.Logger(options.Logger),
ocsmw.LogTrace,

View File

@@ -69,7 +69,7 @@ func Server(cfg *config.Config) *cli.Command {
defer cancel()
m.BuildInfo.WithLabelValues(version.String).Set(1)
m.BuildInfo.WithLabelValues(version.GetString()).Set(1)
rp := proxy.NewMultiHostReverseProxy(
proxy.Logger(logger),

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "Print the version of this binary and the running extension instances",
Category: "Version",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -17,7 +17,7 @@ func Server(opts ...Option) (*http.Server, error) {
return debug.NewService(
debug.Logger(options.Logger),
debug.Name(options.Config.Service.Name),
debug.Version(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -44,7 +44,7 @@ func Server(opts ...Option) (svc.Service, error) {
service := svc.NewService(
svc.Name(options.Config.Service.Name),
svc.Version(version.String),
svc.Version(version.GetString()),
svc.TLSConfig(tlsConfig),
svc.Logger(options.Logger),
svc.Address(options.Config.HTTP.Addr),

View File

@@ -48,7 +48,7 @@ func Server(cfg *config.Config) *cli.Command {
defer cancel()
mtrcs := metrics.New()
mtrcs.BuildInfo.WithLabelValues(version.String).Set(1)
mtrcs.BuildInfo.WithLabelValues(version.GetString()).Set(1)
grpcServer := grpc.Server(
grpc.Config(cfg),

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -16,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(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -18,7 +18,7 @@ func Server(opts ...Option) grpc.Service {
grpc.Namespace(options.Config.GRPC.Namespace),
grpc.Logger(options.Logger),
grpc.Flags(options.Flags...),
grpc.Version(version.String),
grpc.Version(version.GetString()),
)
handle, err := svc.NewHandler(

View File

@@ -49,7 +49,7 @@ func Server(cfg *config.Config) *cli.Command {
defer cancel()
mtrcs := metrics.New()
mtrcs.BuildInfo.WithLabelValues(version.String).Set(1)
mtrcs.BuildInfo.WithLabelValues(version.GetString()).Set(1)
// prepare an HTTP server and add it to the group run.
httpServer := http.Server(

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -16,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(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -19,7 +19,7 @@ func Server(opts ...Option) grpc.Service {
service := grpc.NewService(
grpc.Logger(options.Logger),
grpc.Name(options.Name),
grpc.Version(version.String),
grpc.Version(version.GetString()),
grpc.Address(options.Config.GRPC.Addr),
grpc.Namespace(options.Config.GRPC.Namespace),
grpc.Context(options.Context),

View File

@@ -21,7 +21,7 @@ func Server(opts ...Option) http.Service {
service := http.NewService(
http.Logger(options.Logger),
http.Name(options.Name),
http.Version(version.String),
http.Version(version.GetString()),
http.Address(options.Config.HTTP.Addr),
http.Namespace(options.Config.HTTP.Namespace),
http.Context(options.Context),
@@ -56,7 +56,7 @@ func Server(opts ...Option) http.Service {
mux.Use(middleware.Version(
options.Name,
version.String,
version.GetString(),
))
mux.Use(middleware.Logger(

View File

@@ -98,7 +98,7 @@ func Server(cfg *config.Config) *cli.Command {
cfg.GRPC.Namespace+"."+cfg.Service.Name,
uuid.Must(uuid.NewV4()).String(),
cfg.GRPC.Addr,
version.String,
version.GetString(),
logger,
); err != nil {
logger.Fatal().Err(err).Msg("failed to register the grpc endpoint")

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -16,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(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -85,7 +85,7 @@ func Server(cfg *config.Config) *cli.Command {
cfg.GRPC.Namespace+"."+cfg.Service.Name,
uuid.Must(uuid.NewV4()).String(),
cfg.GRPC.Addr,
version.String,
version.GetString(),
logger,
); err != nil {
logger.Fatal().Err(err).Msg("failed to register the grpc endpoint")

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -16,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(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -85,7 +85,7 @@ func Server(cfg *config.Config) *cli.Command {
cfg.GRPC.Namespace+"."+cfg.Service.Name,
uuid.Must(uuid.NewV4()).String(),
cfg.GRPC.Addr,
version.String,
version.GetString(),
logger,
); err != nil {
logger.Fatal().Err(err).Msg("failed to register the grpc endpoint")

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -16,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(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -85,7 +85,7 @@ func Server(cfg *config.Config) *cli.Command {
cfg.GRPC.Namespace+"."+cfg.Service.Name,
uuid.Must(uuid.NewV4()).String(),
cfg.GRPC.Addr,
version.String,
version.GetString(),
logger,
); err != nil {
logger.Fatal().Err(err).Msg("failed to register the grpc endpoint")
@@ -96,7 +96,7 @@ func Server(cfg *config.Config) *cli.Command {
cfg.HTTP.Namespace+"."+cfg.Service.Name,
uuid.Must(uuid.NewV4()).String(),
cfg.HTTP.Addr,
version.String,
version.GetString(),
logger,
); err != nil {
logger.Fatal().Err(err).Msg("failed to register the http endpoint")

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -16,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(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -85,7 +85,7 @@ func Server(cfg *config.Config) *cli.Command {
cfg.GRPC.Namespace+"."+cfg.Service.Name,
uuid.Must(uuid.NewV4()).String(),
cfg.GRPC.Addr,
version.String,
version.GetString(),
logger,
); err != nil {
logger.Fatal().Err(err).Msg("failed to register the grpc endpoint")

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -16,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(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -52,7 +52,7 @@ func Server(cfg *config.Config) *cli.Command {
defer cancel()
metrics.BuildInfo.WithLabelValues(version.String).Set(1)
metrics.BuildInfo.WithLabelValues(version.GetString()).Set(1)
{
server := grpc.Server(

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -16,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(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -14,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(version.String),
grpc.Version(version.GetString()),
grpc.Context(options.Context),
grpc.Address(options.Config.GRPC.Addr),
grpc.Logger(options.Logger),

View File

@@ -52,7 +52,7 @@ func Server(cfg *config.Config) *cli.Command {
defer cancel()
metrics.BuildInfo.WithLabelValues(version.String).Set(1)
metrics.BuildInfo.WithLabelValues(version.GetString()).Set(1)
service := grpc.NewService(
grpc.Logger(logger),

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -16,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(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -19,11 +19,11 @@ func NewService(opts ...Option) grpc.Service {
grpc.Logger(options.Logger),
grpc.Namespace(options.Namespace),
grpc.Name(options.Name),
grpc.Version(version.String),
grpc.Version(version.GetString()),
grpc.Address(options.Address),
grpc.Context(options.Context),
grpc.Flags(options.Flags...),
grpc.Version(version.String),
grpc.Version(version.GetString()),
)
tconf := options.Config.Thumbnail
gc, err := pool.GetGatewayServiceClient(tconf.RevaGateway)

View File

@@ -17,7 +17,7 @@ func Server(opts ...Option) (http.Service, error) {
service := http.NewService(
http.Logger(options.Logger),
http.Name(options.Config.Service.Name),
http.Version(version.String),
http.Version(version.GetString()),
http.Namespace(options.Config.HTTP.Namespace),
http.Address(options.Config.HTTP.Addr),
http.Context(options.Context),
@@ -32,7 +32,7 @@ func Server(opts ...Option) (http.Service, error) {
// ocismiddleware.Secure,
ocismiddleware.Version(
options.Config.Service.Name,
version.String,
version.GetString(),
),
ocismiddleware.Logger(options.Logger),
),

View File

@@ -98,7 +98,7 @@ func Server(cfg *config.Config) *cli.Command {
cfg.GRPC.Namespace+"."+cfg.Service.Name,
uuid.Must(uuid.NewV4()).String(),
cfg.GRPC.Addr,
version.String,
version.GetString(),
logger,
); err != nil {
logger.Fatal().Err(err).Msg("failed to register the grpc endpoint")

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -16,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(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -16,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(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -18,7 +18,7 @@ func Server(opts ...Option) (http.Service, error) {
http.Logger(options.Logger),
http.Namespace(options.Namespace),
http.Name("web"),
http.Version(version.String),
http.Version(version.GetString()),
http.Address(options.Config.HTTP.Addr),
http.Context(options.Context),
http.Flags(options.Flags...),
@@ -35,7 +35,7 @@ func Server(opts ...Option) (http.Service, error) {
webmid.SilentRefresh,
middleware.Version(
"web",
version.String,
version.GetString(),
),
middleware.Logger(
options.Logger,

View File

@@ -51,7 +51,7 @@ func Server(cfg *config.Config) *cli.Command {
defer cancel()
metrics.BuildInfo.WithLabelValues(version.String).Set(1)
metrics.BuildInfo.WithLabelValues(version.GetString()).Set(1)
{
server, err := http.Server(

View File

@@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")

View File

@@ -16,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(version.String),
debug.Version(version.GetString()),
debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token),
debug.Pprof(options.Config.Debug.Pprof),

View File

@@ -18,7 +18,7 @@ func Server(opts ...Option) (http.Service, error) {
http.Logger(options.Logger),
http.Namespace(options.Config.HTTP.Namespace),
http.Name(options.Config.Service.Name),
http.Version(version.String),
http.Version(version.GetString()),
http.Address(options.Config.HTTP.Addr),
http.Context(options.Context),
http.Flags(options.Flags...),
@@ -41,7 +41,7 @@ func Server(opts ...Option) (http.Service, error) {
middleware.Secure,
middleware.Version(
options.Config.Service.Name,
version.String,
version.GetString(),
),
middleware.Logger(
options.Logger,

View File

@@ -20,7 +20,7 @@ func VersionCommand(cfg *config.Config) *cli.Command {
Usage: "print the version of this binary and all running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")