mirror of
https://github.com/Finb/bark-server.git
synced 2026-04-26 14:15:56 +03:00
[PR #82] [MERGED] Add support for mysql instead of Bbolt and URL prefix strip #146
Labels
No labels
enhancement
in progress
need test
pull-request
v2
v2
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/bark-server#146
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/Finb/bark-server/pull/82
Author: @athurg
Created: 9/18/2021
Status: ✅ Merged
Merged: 9/22/2021
Merged by: @Finb
Base:
master← Head:support_mysql📝 Commits (5)
dfcab17Abstract Database interface from bboltcd29514Add support for mysqla0af706Add doc for MySQL016f564Add support for URLPrefix765e7b8Fixed the register failed without new key📊 Changes
13 files changed (+259 additions, -104 deletions)
View changed files
📝
README.md(+4 -0)➖
database.go(+0 -39)➕
database/bbolt.go(+117 -0)➕
database/database.go(+9 -0)➕
database/mysql.go(+78 -0)📝
go.mod(+1 -0)📝
go.sum(+2 -0)📝
main.go(+25 -3)📝
route_auth.go(+2 -2)📝
route_misc.go(+2 -8)📝
route_push.go(+6 -16)📝
route_register.go(+9 -32)📝
router.go(+4 -4)📄 Description
Support MySQL instead of Bbolt
Add support for mysql instead of Bbolt.
So we can run it without local file system requirement.
It's convenient to use in the container environment , especially in clusters like kubernetes.
Support URL Path Prefix strip
While most of LoadBalancer does not support strip URL path prefix. This URL path prefix was used when multiple application shared a load balancer.
For example, bark-server and gmail share a LB bind with api.google.com. They can both access by
http://api.google.com/bark-server/pingandhttp://api.google.com/gmail/ping. When the LB forward the request to bark-server, it will send a request PATH/bark-server/ping, not a really PATH/pingwith the prefix/bark-serverstripped.So we should strip it by self, and this feature do this.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.