Browse Source

En cours de développement

master
losyme 6 months ago
parent
commit
a5d761db01
  1. 1
      go.mod
  2. 2
      go.sum
  3. 9
      internal/demo/demo.go

1
go.mod

@ -15,6 +15,7 @@ require (
forge.chapril.org/losyme/scheduler v0.0.0-20211003204604-f14dada88faf
forge.chapril.org/losyme/util v0.0.0-20211124132718-3fccea15a31b
forge.chapril.org/losyme/uuid v0.0.0-20211007082235-8d502169e034
github.com/Showmax/go-fqdn v1.0.0
)
require (

2
go.sum

@ -28,6 +28,8 @@ forge.chapril.org/losyme/util v0.0.0-20211124132718-3fccea15a31b h1:5+j6/qkKuv38
forge.chapril.org/losyme/util v0.0.0-20211124132718-3fccea15a31b/go.mod h1:lKYvkuBOTU3E2HuQZDh4ZSA4u3VcFopQbdPUKaHGHEk=
forge.chapril.org/losyme/uuid v0.0.0-20211007082235-8d502169e034 h1:4NMOPXxwRiXS7wltj2ZZmMO1nFRMPmG1dXK4Ta4MtiM=
forge.chapril.org/losyme/uuid v0.0.0-20211007082235-8d502169e034/go.mod h1:AgvbvGzTkQkbiM+s9eVhvLUSHbA0V6N+q5oBFI2v0LA=
github.com/Showmax/go-fqdn v1.0.0 h1:0rG5IbmVliNT5O19Mfuvna9LL7zlHyRfsSvBPZmF9tM=
github.com/Showmax/go-fqdn v1.0.0/go.mod h1:SfrFBzmDCtCGrnHhoDjuvFnKsWjEQX/Q9ARZvOrJAko=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/mapstructure v1.4.2 h1:6h7AQ0yhTcIsmFmnAwQls75jp2Gzs4iB8W7pjMO+rqo=

9
internal/demo/demo.go

@ -10,6 +10,7 @@ import (
"forge.chapril.org/dune/sdk/runner"
"forge.chapril.org/dune/sdk/workers"
"forge.chapril.org/losyme/logger"
"github.com/Showmax/go-fqdn"
)
const (
@ -22,10 +23,18 @@ type Demo struct {
}
func New(logger *logger.Component, model runner.Model) (*Demo, error) {
fqdn, err := fqdn.FqdnHostname()
if err != nil {
logger.Warning("Unable to retrieve the FQDN", "reason", err) //:::::::::::::::::::::::::::::::::::::::::::::::::
fqdn = "?"
}
r := runner.New(_namespace, model)
cfg := &workers.Config{
PoolSize: _workerPoolSize,
Host: fqdn,
Runner: r,
Logger: newWorkersLogger(logger),
}

Loading…
Cancel
Save