mirror of
https://github.com/hibiken/asynqmon.git
synced 2026-04-26 17:45:50 +03:00
[PR #157] [CLOSED] make asynqmon importable into other projects #224
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asynqmon#224
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hibiken/asynqmon/pull/157
Author: @ajatprabha
Created: 9/18/2021
Status: ❌ Closed
Base:
master← Head:master📝 Commits (10+)
5fbbc0amake server & router reusable outside asynqmon packageda0c16emake json data printable4ee992badd PayloadStringer interfacee85cf39make embed.FS injectable56e3b1aadd injectable PayloadStringer9481a66rename go modulec8189f3sort imports9d9cc73rename PayloadStringer => BytesStringer6365dd0expose http.Handler and hide mux router10bbd3drevert back to redis/v8📊 Changes
19 files changed (+716 additions, -534 deletions)
View changed files
📝
.github/workflows/release.yml(+20 -3)📝
.gitignore(+2 -0)📝
Dockerfile(+3 -3)📝
Makefile(+10 -8)📝
README.md(+50 -0)➕
cmd/asynqmon/main.go(+137 -0)📝
cmd/asynqmon/middlewares.go(+0 -0)➕
cmd/asynqmon/static.go(+58 -0)📝
conversion_helpers.go(+176 -163)➕
example_test.go(+30 -0)📝
go.mod(+3 -3)📝
go.sum(+34 -34)➕
handler.go(+134 -0)➖
main.go(+0 -264)📝
queue_handlers.go(+7 -6)📝
redis_info_handlers.go(+10 -10)📝
scheduler_entry_handlers.go(+8 -7)📝
server_handlers.go(+6 -6)📝
task_handlers.go(+28 -27)📄 Description
I would like to bundle the WebUI server into a single binary that can act as an
asnyqserver and also serve theasynqmonUI.For this, we need to import this package into another project, and there are 2 things required to reuse in the derived project:
This will enable to bundle the static contents in the single binary that is to be generated.
This also adds a
BytesStringerinterface to convert payload bytes to ui representable string. This comes in handy where how the payload should be converted can be modified by other projects, say the derived project encodes everything via protobuf.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.