[PR #82] [MERGED] Add support for mysql instead of Bbolt and URL prefix strip #146

Closed
opened 2026-03-03 11:56:25 +03:00 by kerem · 0 comments
Owner

📋 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: masterHead: support_mysql


📝 Commits (5)

  • dfcab17 Abstract Database interface from bbolt
  • cd29514 Add support for mysql
  • a0af706 Add doc for MySQL
  • 016f564 Add support for URLPrefix
  • 765e7b8 Fixed 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/ping and http://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 /ping with the prefix /bark-server stripped.

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.

## 📋 Pull Request Information **Original PR:** https://github.com/Finb/bark-server/pull/82 **Author:** [@athurg](https://github.com/athurg) **Created:** 9/18/2021 **Status:** ✅ Merged **Merged:** 9/22/2021 **Merged by:** [@Finb](https://github.com/Finb) **Base:** `master` ← **Head:** `support_mysql` --- ### 📝 Commits (5) - [`dfcab17`](https://github.com/Finb/bark-server/commit/dfcab17070530740387de717ca9e91fe67df05fd) Abstract Database interface from bbolt - [`cd29514`](https://github.com/Finb/bark-server/commit/cd29514c5972e14f319800f414485f4d078f3d93) Add support for mysql - [`a0af706`](https://github.com/Finb/bark-server/commit/a0af706fe41b7edc4a155fa7307e75b89fd5a58e) Add doc for MySQL - [`016f564`](https://github.com/Finb/bark-server/commit/016f5649c223cbb65e8907bf0e1968b9236272ac) Add support for URLPrefix - [`765e7b8`](https://github.com/Finb/bark-server/commit/765e7b83ae1721e456195cd8c95b5f0377575e89) Fixed the register failed without new key ### 📊 Changes **13 files changed** (+259 additions, -104 deletions) <details> <summary>View changed files</summary> 📝 `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) </details> ### 📄 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/ping` and `http://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 `/ping` with the prefix `/bark-server` stripped. So we should strip it by self, and this feature do this. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 11:56:25 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/bark-server#146
No description provided.