Browse Source

En cours de développement

master
mls-361 2 months ago
parent
commit
385026b51b
  1. 3
      cmd/main.go
  2. 20
      go.mod
  3. 56
      go.sum
  4. 1
      internal/components/components.go
  5. 8
      internal/demo/demo.go

3
cmd/main.go

@ -102,6 +102,9 @@ func waitEnd(server components.Server) (*sync.WaitGroup, chan struct{}) {
func run() error {
app := application.New("armen", _version, _builtAt)
if err := app.Initialize(); err != nil {
return app.OnError(err)
}
if end, err := cmdline.Parse(app); end || err != nil {
return app.OnError(err)

20
go.mod

@ -3,16 +3,16 @@ module forge.chapril.org/armen/armen
go 1.15
require (
forge.chapril.org/armen/jw v0.0.0-20210420182827-e84586d52e7d
forge.chapril.org/armen/memory v0.0.0-20210420182951-aeef2431dd9a
forge.chapril.org/armen/model v0.0.0-20210420183407-9aafd7a91b43
forge.chapril.org/armen/runner v0.0.0-20210420200355-aae17dcd1c71
forge.chapril.org/armen/workers v0.0.0-20210420222457-ca56600c0582
forge.chapril.org/mls-361/application v0.0.0-20210420182525-553553ee79fd
forge.chapril.org/mls-361/crypto v0.0.0-20210420182617-6b6e1d67ae49
forge.chapril.org/mls-361/errors v0.0.0-20210420182326-62f3fd4fd5e9
forge.chapril.org/mls-361/jsonapi v0.0.0-20210420182755-ebad31ee465b
forge.chapril.org/mls-361/logger v0.0.0-20210420182642-0cc71e426d35
forge.chapril.org/armen/jw v0.0.0-20210422202740-51e3dd1f5406
forge.chapril.org/armen/memory v0.0.0-20210422202930-3e8268a83da2
forge.chapril.org/armen/model v0.0.0-20210422203059-d6ba341bf78a
forge.chapril.org/armen/runner v0.0.0-20210422204105-6090a66f4a16
forge.chapril.org/armen/workers v0.0.0-20210422211214-fb57df723237
forge.chapril.org/mls-361/application v0.0.0-20210422194208-f2d804d67966
forge.chapril.org/mls-361/crypto v0.0.0-20210422194221-9ea3a720e03b
forge.chapril.org/mls-361/errors v0.0.0-20210422194103-e8125d4f73ed
forge.chapril.org/mls-361/jsonapi v0.0.0-20210422194344-004562ed64b5
forge.chapril.org/mls-361/logger v0.0.0-20210422194254-ea0b0d5ef049
forge.chapril.org/mls-361/uuid v0.0.0-20210411123640-49d47af267ff
github.com/julienschmidt/httprouter v1.3.0
)

56
go.sum

@ -1,34 +1,34 @@
forge.chapril.org/armen/factory v0.0.0-20210420185548-4a8d6eee6f1a h1:3akLeqhwfmdQ6s+LK5nwDzhoQqYULnS6Yu3bhZJLAZE=
forge.chapril.org/armen/factory v0.0.0-20210420185548-4a8d6eee6f1a/go.mod h1:8X6DFD/KePInb+qxq8fj19QLmvgJnRW6SGZS9OAXh1o=
forge.chapril.org/armen/jw v0.0.0-20210420182827-e84586d52e7d h1:xtGaldnHe8gRdCRVR+tG6kYkklErNcnuJjldjijVkfU=
forge.chapril.org/armen/jw v0.0.0-20210420182827-e84586d52e7d/go.mod h1:/493TkL40h/dcYibnL1dPOKD1sgLoChgLyQ8BiLPr6g=
forge.chapril.org/armen/memory v0.0.0-20210420182951-aeef2431dd9a h1:a2JaoORflqK97IYY0lhO4T+SsWnCVXcxgXb/Z9QmR80=
forge.chapril.org/armen/memory v0.0.0-20210420182951-aeef2431dd9a/go.mod h1:WHra3zbTsXiivHF1e7rmMFWvUOLYQuoaMG+VysjpG1A=
forge.chapril.org/armen/model v0.0.0-20210420183407-9aafd7a91b43 h1:thA5ZEYqvu0MMHgQ88aWUdIAo4FhEgoYNfeUzMzq0GQ=
forge.chapril.org/armen/model v0.0.0-20210420183407-9aafd7a91b43/go.mod h1:phzQDpT4AAIDu13oNpPPVGNeVa6alMi+0OCPQ9YF5m4=
forge.chapril.org/armen/runner v0.0.0-20210420200355-aae17dcd1c71 h1:SJUSfIkQaPpo/c9+DSihnA79cWnqMhMEWCC2xsZOU7c=
forge.chapril.org/armen/runner v0.0.0-20210420200355-aae17dcd1c71/go.mod h1:pX8rNP1WOYlxF1sY7cef9yIUPtuP/k8QLL7A5anmSPA=
forge.chapril.org/armen/workers v0.0.0-20210420222457-ca56600c0582 h1:X4bQFvc9UHkDmF5IFCSc5Arld3k3mhBcX7NY/OG4j5Y=
forge.chapril.org/armen/workers v0.0.0-20210420222457-ca56600c0582/go.mod h1:LIWGF3+qhCUHeKyqjblKAKxvgSQJ8ud4fLR+WLKpdaU=
forge.chapril.org/mls-361/application v0.0.0-20210420182525-553553ee79fd h1:DS7paKa0kOu2tKZjAWRkhqtk49PsJJGYW4D1a2NRddU=
forge.chapril.org/mls-361/application v0.0.0-20210420182525-553553ee79fd/go.mod h1:x7iBnk1CanvvKBkI1H3CZ5juSu/cyLz1lLZI1OrmQFQ=
forge.chapril.org/armen/factory v0.0.0-20210422203121-cb802ed77a3c h1:ZWsZCwYcnLkabFp0QV/wYwASJvzBTdCyRoxC6IRlx/w=
forge.chapril.org/armen/factory v0.0.0-20210422203121-cb802ed77a3c/go.mod h1:DbfYZ0ubIxtO1U2Wp+91kHDiwguxbVYXtXAfwPrlIcI=
forge.chapril.org/armen/jw v0.0.0-20210422202740-51e3dd1f5406 h1:pNqbmdak/CNWx7Svb1LJNUzfJqhMRJ11a2tz31+ZNio=
forge.chapril.org/armen/jw v0.0.0-20210422202740-51e3dd1f5406/go.mod h1:LvAo4zkhL95K5srqOcwERT8F7GCDhw46nAorzcCXq2E=
forge.chapril.org/armen/memory v0.0.0-20210422202930-3e8268a83da2 h1:b8D/EyxakzDuNkYNQ3JrjTRbOkX1qdzxwGZpBH6ud9k=
forge.chapril.org/armen/memory v0.0.0-20210422202930-3e8268a83da2/go.mod h1:RS/px8ZkM50fouQNDw8tJ8u3UGAu8xkhr+WBTO0haCE=
forge.chapril.org/armen/model v0.0.0-20210422203059-d6ba341bf78a h1:5PTuKZpZUTVrSzSKQ0nYzDgL8f5gAWoD/ULWmGhDZvs=
forge.chapril.org/armen/model v0.0.0-20210422203059-d6ba341bf78a/go.mod h1:vuIS4LO2a+RmUSmS1AVtdoC3E4888HQ4KqLC64a5b/w=
forge.chapril.org/armen/runner v0.0.0-20210422204105-6090a66f4a16 h1:pKAPsXKXn/6wNmvaosR1SARLkOU2Umr8KIbYnnykJTw=
forge.chapril.org/armen/runner v0.0.0-20210422204105-6090a66f4a16/go.mod h1:Bnv14tamrfXfEuLvfyvFvCaz/nSDF64+bmyZm1P1ehk=
forge.chapril.org/armen/workers v0.0.0-20210422211214-fb57df723237 h1:ooSzgm0W0EJj/jHuNoH2Bnxvdo804KmWd2tQGtKxyac=
forge.chapril.org/armen/workers v0.0.0-20210422211214-fb57df723237/go.mod h1:CQJH/QCWYZpWzG9Upkmwf2kNlGrKJvK4Rh0LFWbm0H4=
forge.chapril.org/mls-361/application v0.0.0-20210422194208-f2d804d67966 h1:vodmfll52TXYACz1QPwizex6mRGemoTQWtQQqKQpPlU=
forge.chapril.org/mls-361/application v0.0.0-20210422194208-f2d804d67966/go.mod h1:CzjKpQGLrr4e1MaWIHfodM6rdKfD6zXT85jQcUpAviE=
forge.chapril.org/mls-361/buffer v0.0.0-20210410182428-5dc7a7b2ae79 h1:Lh+y98uVFC7btl5FdxKNtokzHD2j14R4ZIgJECao6r4=
forge.chapril.org/mls-361/buffer v0.0.0-20210410182428-5dc7a7b2ae79/go.mod h1:JnOkXF+AEkQ4mv65rzW9eVLsauGzOYIUBQB0zUb5NGE=
forge.chapril.org/mls-361/crypto v0.0.0-20210420182617-6b6e1d67ae49 h1:qz9LHxgItRKdudYA08lKnO2ZdNjnOjRprgkFPKnEp4k=
forge.chapril.org/mls-361/crypto v0.0.0-20210420182617-6b6e1d67ae49/go.mod h1:5BNkSGocTvkuYuD8otecv22YrF+WOY9JFDROCA4Y+Hk=
forge.chapril.org/mls-361/errors v0.0.0-20210420182326-62f3fd4fd5e9 h1:u7aJFe9qecZSNg61nzVfHr9oG6LfEIEQfwqvuqWhT8A=
forge.chapril.org/mls-361/errors v0.0.0-20210420182326-62f3fd4fd5e9/go.mod h1:tYV6p4tU+TxW2HlyaQvCVx/7XYBapDHZJ+ipgtjTrXQ=
forge.chapril.org/mls-361/fqdn v0.0.0-20210420182433-42f8f03d04cf h1:VEZ31mhdE7ED+TtSK1erUpU1jPTjCdYVYyeKfEecDvc=
forge.chapril.org/mls-361/fqdn v0.0.0-20210420182433-42f8f03d04cf/go.mod h1:cU0VU1r1rJZQtvYcGj4O2Xje0Kc7ddz3WeeuAC9ot0Q=
forge.chapril.org/mls-361/jsonapi v0.0.0-20210420182755-ebad31ee465b h1:9R5cBqnU5G04YWPsUNfVSzMWBkugHLq5TkY8+Oy09Wo=
forge.chapril.org/mls-361/jsonapi v0.0.0-20210420182755-ebad31ee465b/go.mod h1:IxkEjKgVZes0w/uCaYrRUjI+afO/3l+MdJP2zkRhQyQ=
forge.chapril.org/mls-361/kvfmt v0.0.0-20210411202715-0e7c3e922d37 h1:6e1Y7hTJ0B8BYStiZSCdW4+v686rOpstQh2B5SWOhZU=
forge.chapril.org/mls-361/kvfmt v0.0.0-20210411202715-0e7c3e922d37/go.mod h1:bv44R0CAd8lQV4ub1hjLE3kWYwpfsW4Ro9zRnD4YOMU=
forge.chapril.org/mls-361/logger v0.0.0-20210420182642-0cc71e426d35 h1:aigCsYTR9YHAXttpH3HCmDDr1wXAZ2o2F+RKZDOaqkY=
forge.chapril.org/mls-361/logger v0.0.0-20210420182642-0cc71e426d35/go.mod h1:u0SOoUQgp6cpIA7xtsJibV/TvYvkuJOQGy17y5kpwys=
forge.chapril.org/mls-361/crypto v0.0.0-20210422194221-9ea3a720e03b h1:EgvW1enmwfORgTE8/Exd5HkdBGv5m6+8PeUBQTzykTA=
forge.chapril.org/mls-361/crypto v0.0.0-20210422194221-9ea3a720e03b/go.mod h1:p/JbKCRB+UtG0LoO9Z/FIvt9Kb+iarwdUKBGfW05Qis=
forge.chapril.org/mls-361/errors v0.0.0-20210422194103-e8125d4f73ed h1:lBlR7V+7SNR29RJJ27c2F5mFvvU1/dh3WNEbb+ynYWI=
forge.chapril.org/mls-361/errors v0.0.0-20210422194103-e8125d4f73ed/go.mod h1:yVCKFINZDota/9BePf3LfdhZcOev/t9Nod7jWJ+7yHs=
forge.chapril.org/mls-361/fqdn v0.0.0-20210422194135-d9b6440537a0 h1:xWm6u72WmwPHI5Y7AvLGZ7MrtAMTVXbNLL/JzfnUSQE=
forge.chapril.org/mls-361/fqdn v0.0.0-20210422194135-d9b6440537a0/go.mod h1:B6ctoGAFuKt6Pl6oElm4QynJx0tKXY9UeaXGpd3nPo4=
forge.chapril.org/mls-361/jsonapi v0.0.0-20210422194344-004562ed64b5 h1:02B5ESYGZHBCCd+jeUvLyXjLe17PbZvvfo6Jh6H62co=
forge.chapril.org/mls-361/jsonapi v0.0.0-20210422194344-004562ed64b5/go.mod h1:BvT/ShLSsrwN1PuBlHLQmST0hUf4rZbdBhtKPbecBMs=
forge.chapril.org/mls-361/kvfmt v0.0.0-20210422194007-40b03b0a2d00 h1:hz3vSpCKHE1PpG5VlJmIRDbnOj02OFYeG7nmvqqL9Yw=
forge.chapril.org/mls-361/kvfmt v0.0.0-20210422194007-40b03b0a2d00/go.mod h1:bv44R0CAd8lQV4ub1hjLE3kWYwpfsW4Ro9zRnD4YOMU=
forge.chapril.org/mls-361/logger v0.0.0-20210422194254-ea0b0d5ef049 h1:SZEMhEJDGeRpu///tAjQWLEUkppNzPqXxbtpbt8r15k=
forge.chapril.org/mls-361/logger v0.0.0-20210422194254-ea0b0d5ef049/go.mod h1:R5sQaQX16aVDbOtDiBWVzxPQWqYMs8eCWIhjqmjyR6s=
forge.chapril.org/mls-361/uuid v0.0.0-20210411123640-49d47af267ff h1:N7L3nN/9Wlck9qtIxH6gbQ9sbWtsZ048+eDEdpvD09g=
forge.chapril.org/mls-361/uuid v0.0.0-20210411123640-49d47af267ff/go.mod h1:OAYM+f6ErfC4jbruuG2crA5W7YSpr7+wEs2MrxIzR3Q=
github.com/jinzhu/copier v0.2.9 h1:v0Wnz+GKEI63FX7cU2LI20mFFlhTNl+36cjDIuhq3QY=
github.com/jinzhu/copier v0.2.9/go.mod h1:24xnZezI2Yqac9J61UC6/dG/k76ttpq0DdJI3QmUvro=
github.com/jinzhu/copier v0.3.0 h1:P5zN9OYSxmtzZmwgcVmt5Iu8egfP53BGMPAFgEksKPI=
github.com/jinzhu/copier v0.3.0/go.mod h1:24xnZezI2Yqac9J61UC6/dG/k76ttpq0DdJI3QmUvro=
github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U=
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=

1
internal/components/components.go

@ -21,6 +21,7 @@ type Application interface {
ID() uuid.UUID
Name() string
LookupEnv(suffix string) (string, bool)
Host() string
}
// Config AFAIRE.

8
internal/demo/demo.go

@ -80,17 +80,15 @@ func Build(app components.Application, logger components.Logger, model component
p, err := workers.NewPool(&workers.Config{
Logger: logger,
PoolSize: 2,
Model: model,
Runner: r,
PoolSize: 2,
Host: app.Host(),
})
if err != nil {
return err
}
if err := p.AddRunner(r); err != nil {
return err
}
d.pool = p
_demo = d

Loading…
Cancel
Save