Skip to content

Commit

Permalink
chore(deps): bump github.com/ViBiOh/vith from 0.5.2 to 0.5.3
Browse files Browse the repository at this point in the history
Bumps [github.com/ViBiOh/vith](https://github.com/ViBiOh/vith) from 0.5.2 to 0.5.3.
- [Release notes](https://github.com/ViBiOh/vith/releases)
- [Commits](https://github.com/ViBiOh/vith/compare/v0.5.2...v0.5.3)

---
updated-dependencies:
- dependency-name: github.com/ViBiOh/vith
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
dependabot[bot] authored and ViBiOh committed Sep 25, 2022
1 parent ddb4364 commit 6c76ec5
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 63 deletions.
21 changes: 11 additions & 10 deletions cmd/fibr/fibr.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,17 @@ func main() {
fibrApp := fibr.New(&crudApp, rendererApp, shareApp, webhookApp, middlewareApp)
handler := rendererApp.Handler(fibrApp.TemplateFunc)

ctx := context.Background()

go amqpThumbnailApp.Start(ctx, client.health.Done())
go amqpExifApp.Start(ctx, client.health.Done())
go amqpShareApp.Start(ctx, client.health.Done())
go amqpWebhookApp.Start(ctx, client.health.Done())
go webhookApp.Start(client.health.Done())
go shareApp.Start(client.health.Done())
go crudApp.Start(client.health.Done())
go eventBus.Start(client.health.Done(), storageProvider, []provider.Renamer{thumbnailApp.Rename, exifApp.Rename}, shareApp.EventConsumer, thumbnailApp.EventConsumer, exifApp.EventConsumer, webhookApp.EventConsumer)
amqpCtx := context.Background()
ctx := client.health.Context()

go amqpThumbnailApp.Start(amqpCtx, client.health.Done())
go amqpExifApp.Start(amqpCtx, client.health.Done())
go amqpShareApp.Start(amqpCtx, client.health.Done())
go amqpWebhookApp.Start(amqpCtx, client.health.Done())
go webhookApp.Start(ctx)
go shareApp.Start(ctx)
go crudApp.Start(ctx)
go eventBus.Start(ctx, storageProvider, []provider.Renamer{thumbnailApp.Rename, exifApp.Rename}, shareApp.EventConsumer, thumbnailApp.EventConsumer, exifApp.EventConsumer, webhookApp.EventConsumer)

go promServer.Start("prometheus", client.health.End(), client.prometheus.Handler())
go appServer.Start("http", client.health.End(), httputils.Handler(handler, client.health, recoverer.Middleware, client.prometheus.Middleware, client.tracer.Middleware, owasp.New(config.owasp).Middleware))
Expand Down
28 changes: 14 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ module github.com/ViBiOh/fibr
go 1.19

require (
github.com/ViBiOh/ChatPotte v0.2.14
github.com/ViBiOh/absto v1.0.5
github.com/ViBiOh/auth/v2 v2.14.10
github.com/ViBiOh/exas v0.5.2
github.com/ViBiOh/ChatPotte v0.2.15
github.com/ViBiOh/absto v1.0.6
github.com/ViBiOh/auth/v2 v2.14.11
github.com/ViBiOh/exas v0.5.3
github.com/ViBiOh/flags v1.2.0
github.com/ViBiOh/httputils/v4 v4.47.9
github.com/ViBiOh/vith v0.5.2
github.com/ViBiOh/httputils/v4 v4.48.0
github.com/ViBiOh/vith v0.5.3
github.com/golang/mock v1.6.0
github.com/prometheus/client_golang v1.13.0
github.com/streadway/amqp v1.0.0
go.opentelemetry.io/otel v1.10.0
go.opentelemetry.io/otel/trace v1.10.0
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90
golang.org/x/crypto v0.0.0-20220924013350-4ba4fb4dd9e7
golang.org/x/text v0.3.7
)

Expand All @@ -31,11 +31,11 @@ require (
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.15.9 // indirect
github.com/klauspost/compress v1.15.10 // indirect
github.com/klauspost/cpuid/v2 v2.1.1 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/minio/md5-simd v1.1.2 // indirect
github.com/minio/minio-go/v7 v7.0.36 // indirect
github.com/minio/minio-go/v7 v7.0.37 // indirect
github.com/minio/sha256-simd v1.0.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
Expand All @@ -46,13 +46,13 @@ require (
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/tdewolff/minify/v2 v2.12.1 // indirect
github.com/tdewolff/parse/v2 v2.6.3 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.0 // indirect
go.opentelemetry.io/otel/exporters/jaeger v1.10.0 // indirect
go.opentelemetry.io/otel/metric v0.31.0 // indirect
go.opentelemetry.io/otel/metric v0.32.0 // indirect
go.opentelemetry.io/otel/sdk v1.10.0 // indirect
golang.org/x/net v0.0.0-20220909164309-bea034e7d591 // indirect
golang.org/x/sys v0.0.0-20220913175220-63ea55921009 // indirect
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 // indirect
golang.org/x/net v0.0.0-20220921203646-d300de134e69 // indirect
golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 // indirect
golang.org/x/term v0.0.0-20220919170432-7a66f970e087 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
)
56 changes: 28 additions & 28 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/ViBiOh/ChatPotte v0.2.14 h1:P/u2yx6R1paDWVhPzu2IRj7OiQrnr9AFV9CFqTEKmOo=
github.com/ViBiOh/ChatPotte v0.2.14/go.mod h1:lwOYt7xyhG9bcdUdxYaOBN59Owcc8GyM+M1xs9/Qntw=
github.com/ViBiOh/absto v1.0.5 h1:S1QwKW9FUieYKuYOb7RrKqo0t7O40GSL2FdlYwXK3kQ=
github.com/ViBiOh/absto v1.0.5/go.mod h1:0+iBxmam48r3lMeMtU0lL7yHsAdGkcHeS644b31GlLk=
github.com/ViBiOh/auth/v2 v2.14.10 h1:R8S8RRx6dUB8k1daCE4nyrMic5bBBJQLRGvRfeBrCKs=
github.com/ViBiOh/auth/v2 v2.14.10/go.mod h1:sVyWtW3Vw6VbusIMh1JHJ4vMAzZoQ8a/bw8tl/r8Q/I=
github.com/ViBiOh/exas v0.5.2 h1:h+BRP8Q3Tr1aL495i0bDnGtpFLlCgWTT2YIOX8X7RBo=
github.com/ViBiOh/exas v0.5.2/go.mod h1:CaqjlqJiS3G+Gft/7BOlKbC7xQsW8hMSvjRFIWcjPB0=
github.com/ViBiOh/ChatPotte v0.2.15 h1:z8dxNa4Dmbpv18N4ZmoXRo8kvoINce+QrMefqIiqjFw=
github.com/ViBiOh/ChatPotte v0.2.15/go.mod h1:IUBJSHIN41yBNO70X05HDJVoyUO+aI86JwvrMPSr7wM=
github.com/ViBiOh/absto v1.0.6 h1:frlTUMgdL1qBCyKTGf3vlxulv8EUgYv2UE3/BylXNQc=
github.com/ViBiOh/absto v1.0.6/go.mod h1:phPe9zo3ecMrtUMFVFBeGS71qMTzluFZje/qYb7msHI=
github.com/ViBiOh/auth/v2 v2.14.11 h1:Bjh1CvBiTVAts0IbuqrPsRRHuUazNwMxtHDdPI60+UE=
github.com/ViBiOh/auth/v2 v2.14.11/go.mod h1:/gJvnWanGMh9puScqVaY2aOlHHwU/15oDjeZOEMRO48=
github.com/ViBiOh/exas v0.5.3 h1:Y1kNfLBIK6FSGs467OoMvwrOaz4KgDYanbjZeVeJImQ=
github.com/ViBiOh/exas v0.5.3/go.mod h1:7ZUMMD7pbNNnpagtK8YrS0ks/X/05w2MR4dweAc5N18=
github.com/ViBiOh/flags v1.2.0 h1:DaujjNXzD29KxKyp4eZdn7c9+uBN5DokWgDAe7DcUmc=
github.com/ViBiOh/flags v1.2.0/go.mod h1:UyMB5zeD/aId7Xw3x7577ZNU298JmukzOcV8p/H2W1s=
github.com/ViBiOh/httputils/v4 v4.47.9 h1:lEhwUZI0ioFMwzVkuNZyDVu0IrxuOT9adwOUUy1NnEQ=
github.com/ViBiOh/httputils/v4 v4.47.9/go.mod h1:B31MGYvRLxCarxA3onkKE7DLGAlFzvx2gpWjSmbHUK8=
github.com/ViBiOh/vith v0.5.2 h1:fQh0kLjQALglfbbKGWjw3Tlt4tdN2LHMbe7txynuc48=
github.com/ViBiOh/vith v0.5.2/go.mod h1:fnE4gx85IArbQd64ZUiiGM0JNCJ+1+Fc2MPzHxuxUkA=
github.com/ViBiOh/httputils/v4 v4.48.0 h1:KySMrx2rJTEsJI6SNJDlU2m7zQt16f3Q2BfKEgdLbtU=
github.com/ViBiOh/httputils/v4 v4.48.0/go.mod h1:XcA+8YmzJ7r/VjmtrIDuM1yXdlgpL8SoT7ywmuC87j8=
github.com/ViBiOh/vith v0.5.3 h1:TmVJx4lM6FdEMaAx8rMbgoqSYjRmWz8rlkvpu2pTGyc=
github.com/ViBiOh/vith v0.5.3/go.mod h1:Ww5gkhRgGNaUBTamMyAV7n6qktjKuSjBAT7C4Z95JfU=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
Expand Down Expand Up @@ -181,8 +181,8 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.15.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY=
github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=
github.com/klauspost/compress v1.15.10 h1:Ai8UzuomSCDw90e1qNMtb15msBXsNpH6gzkkENQNcJo=
github.com/klauspost/compress v1.15.10/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM=
github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/cpuid/v2 v2.1.1 h1:t0wUqjowdm8ezddV5k0tLWVklVuvLJpoHeb4WBdydm0=
Expand All @@ -198,8 +198,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0j
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
github.com/minio/minio-go/v7 v7.0.36 h1:KPzAl8C6jcRFEUsGUHR6deRivvKATPNZThzi7D9y/sc=
github.com/minio/minio-go/v7 v7.0.36/go.mod h1:nCrRzjoSUQh8hgKKtu3Y708OLvRLtuASMg2/nvmbarw=
github.com/minio/minio-go/v7 v7.0.37 h1:aJvYMbtpVPSFBck6guyvOkxK03MycxDOCs49ZBuY5M8=
github.com/minio/minio-go/v7 v7.0.37/go.mod h1:nCrRzjoSUQh8hgKKtu3Y708OLvRLtuASMg2/nvmbarw=
github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g=
github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
Expand Down Expand Up @@ -278,14 +278,14 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.0 h1:Ajldaqhxqw/gNzQA45IKFWLdG7jZuXX/wBW1d5qvbUI=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.0/go.mod h1:9NiG9I2aHTKkcxqCILhjtyNA1QEiCjdBACv4IvrFQ+c=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.0 h1:qZ3KzA4qPzLBDtQyPk4ydjlg8zvXbNysnFHaVMKJbVo=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.0/go.mod h1:14Oo79mRwusSI02L0EfG3Gp1uF3+1wSL+D4zDysxyqs=
go.opentelemetry.io/otel v1.10.0 h1:Y7DTJMR6zs1xkS/upamJYk0SxxN4C9AqRd77jmZnyY4=
go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ=
go.opentelemetry.io/otel/exporters/jaeger v1.10.0 h1:7W3aVVjEYayu/GOqOVF4mbTvnCuxF1wWu3eRxFGQXvw=
go.opentelemetry.io/otel/exporters/jaeger v1.10.0/go.mod h1:n9IGyx0fgyXXZ/i0foLHNxtET9CzXHzZeKCucvRBFgA=
go.opentelemetry.io/otel/metric v0.31.0 h1:6SiklT+gfWAwWUR0meEMxQBtihpiEs4c+vL9spDTqUs=
go.opentelemetry.io/otel/metric v0.31.0/go.mod h1:ohmwj9KTSIeBnDBm/ZwH2PSZxZzoOaG2xZeekTRzL5A=
go.opentelemetry.io/otel/metric v0.32.0 h1:lh5KMDB8xlMM4kwE38vlZJ3rZeiWrjw3As1vclfC01k=
go.opentelemetry.io/otel/metric v0.32.0/go.mod h1:PVDNTt297p8ehm949jsIzd+Z2bIZJYQQG/uuHTeWFHY=
go.opentelemetry.io/otel/sdk v1.10.0 h1:jZ6K7sVn04kk/3DNUdJ4mqRlGDiXAVuIG+MMENpTNdY=
go.opentelemetry.io/otel/sdk v1.10.0/go.mod h1:vO06iKzD5baltJz1zarxMCNHFpUlUiOy4s65ECtn6kE=
go.opentelemetry.io/otel/trace v1.10.0 h1:npQMbR8o7mum8uF95yFbOEJffhs1sbCOfDh8zAJiH5E=
Expand All @@ -296,8 +296,8 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM=
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220924013350-4ba4fb4dd9e7 h1:WJywXQVIb56P2kAvXeMGTIgQ1ZHQxR60+F9dLsodECc=
golang.org/x/crypto v0.0.0-20220924013350-4ba4fb4dd9e7/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
Expand Down Expand Up @@ -361,8 +361,8 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220909164309-bea034e7d591 h1:D0B/7al0LLrVC8aWF4+oxpv/m8bc7ViFfVS8/gXGdqI=
golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/net v0.0.0-20220921203646-d300de134e69 h1:hUJpGDpnfwdJW8iNypFjmSY0sCBEL+spFTZ2eO+Sfps=
golang.org/x/net v0.0.0-20220921203646-d300de134e69/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand Down Expand Up @@ -423,12 +423,12 @@ golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220913175220-63ea55921009 h1:PuvuRMeLWqsf/ZdT1UUZz0syhioyv1mzuFZsXs4fvhw=
golang.org/x/sys v0.0.0-20220913175220-63ea55921009/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 h1:h+EGohizhe9XlX18rfpa8k8RAc5XyaeamM+0VHRd4lc=
golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 h1:Q5284mrmYTpACcm+eAKjKJH48BBwSyfJqmmGDTtT8Vc=
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.0.0-20220919170432-7a66f970e087 h1:tPwmk4vmvVCMdr98VgL4JH+qZxPL8fqlUOHnyOM8N3w=
golang.org/x/term v0.0.0-20220919170432-7a66f970e087/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand Down
10 changes: 6 additions & 4 deletions pkg/crud/crud.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,24 +139,26 @@ func New(config Config, storage absto.Storage, rendererApp renderer.App, shareAp
return app, nil
}

func (a App) Start(done <-chan struct{}) {
func (a App) Start(ctx context.Context) {
if a.amqpClient == nil {
a.start(context.Background(), done)
a.start(ctx)
return
}

if _, err := a.amqpClient.Exclusive(context.Background(), a.amqpExclusiveRoutingKey, time.Hour, func(ctx context.Context) error {
a.start(ctx, done)
a.start(ctx)
return nil
}); err != nil {
logger.Error("get exclusive semaphore: %s", err)
}
}

func (a App) start(ctx context.Context, done <-chan struct{}) {
func (a App) start(ctx context.Context) {
logger.Info("Starting startup check...")
defer logger.Info("Ending startup check.")

done := ctx.Done()

err := a.storageApp.Walk(ctx, "", func(item absto.Item) error {
select {
case <-done:
Expand Down
4 changes: 2 additions & 2 deletions pkg/provider/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,14 +319,14 @@ func (e EventBus) Push(event Event) error {
}
}

func (e EventBus) Start(done <-chan struct{}, storageApp absto.Storage, renamers []Renamer, consumers ...EventConsumer) {
func (e EventBus) Start(ctx context.Context, storageApp absto.Storage, renamers []Renamer, consumers ...EventConsumer) {
defer close(e.done)

go func() {
defer close(e.bus)
defer close(e.closed)

<-done
<-ctx.Done()
}()

for event := range e.bus {
Expand Down
6 changes: 3 additions & 3 deletions pkg/share/share.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ func (a *App) Get(requestPath string) provider.Share {
return provider.Share{}
}

func (a *App) Start(done <-chan struct{}) {
if err := a.loadShares(context.Background()); err != nil {
func (a *App) Start(ctx context.Context) {
if err := a.loadShares(ctx); err != nil {
logger.Error("refresh shares: %s", err)
return
}
Expand All @@ -139,7 +139,7 @@ func (a *App) Start(done <-chan struct{}) {
purgeCron.Exclusive(a, a.amqpExclusiveRoutingKey, semaphoreDuration)
}

purgeCron.Start(a.cleanShares, done)
purgeCron.Start(ctx, a.cleanShares)
}

func (a *App) loadShares(ctx context.Context) error {
Expand Down
4 changes: 2 additions & 2 deletions pkg/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ exclusive:
return nil
}

func (a *App) Start(_ <-chan struct{}) {
func (a *App) Start(ctx context.Context) {
a.Lock()
defer a.Unlock()

if err := a.loadWebhooks(context.Background()); err != nil {
if err := a.loadWebhooks(ctx); err != nil {
logger.Error("refresh webhooks: %s", err)
return
}
Expand Down

0 comments on commit 6c76ec5

Please sign in to comment.