From 35e09994b545429a569f138a5dc6f160250ee456 Mon Sep 17 00:00:00 2001 From: koladev Date: Sat, 6 Jul 2024 10:32:56 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactoring=20for=20adapte?= =?UTF-8?q?r?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .DS_Store | Bin 0 -> 10244 bytes sendhooks/adapter/adapter.go | 41 ++++++ .../adapter_manager/adapter_manager.go | 65 ++++++++++ .../adapter/redis_adapter/redis_adapter.go | 105 +++++++++++++++ sendhooks/main.go | 120 +++--------------- sendhooks/queue/worker.go | 35 +++-- sendhooks/sender/utils.go | 4 +- sendhooks/sender/webhook.go | 4 +- sendhooks/sender/webhook_test.go | 14 +- 9 files changed, 267 insertions(+), 121 deletions(-) create mode 100644 .DS_Store create mode 100644 sendhooks/adapter/adapter.go create mode 100644 sendhooks/adapter/adapter_manager/adapter_manager.go create mode 100644 sendhooks/adapter/redis_adapter/redis_adapter.go diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..ab5ceffd90de20a4aad060dcb2704eaf362924b6 GIT binary patch literal 10244 zcmeHMTWl0n7(V~>Hp8@biY=6>(8Vp`wx!)dAf;TkH*Q5P-QEk9-OkVs?9P;(*=?a# z`oKl;L4(l*W1$+R zw*V+JvDv=x8TSFUjmMDzM~*USo8p*k_W+J5I9m*0=GgC{>L>$_9A%Q36JX{99M9nF zP{8(%b{<=uK!8cNbP;e7n2G@1yJwRXWIu`E?tSY1-8;EIYBV&2BSsk8`Q_jLy{LTn za_v+dWk#KW{?u~XwPH#LqIN6W->7wkCFG$vx0UL)QAK6F6x(en@qkti9kSy7HMMhtQQ+k1%>9yA9W z2AmHML^RW?th@qTMrKxa4xht|{N7-{F&MN$R@|%$#ky&&#V{h_t+!!eCh8e38B3G6TutI4 z%o20uj*d>TyF=?W^q_V`?UC|Lgk~#Ncg55MLek!AMB-81?2!t3Ly_KiB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