forked from fl00r/go-tarantool-1.6
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature/balancing-faces: add external load balancing methods support
I added the ability to use custom balancing methods when connecting with a pool.
- Loading branch information
Maksim Konovalov
committed
Sep 5, 2024
1 parent
8b2be01
commit 56b34af
Showing
5 changed files
with
43 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package pool | ||
|
||
import "github.com/tarantool/go-tarantool/v2" | ||
|
||
type BalancingMethod = func(int) BalancingPool | ||
|
||
type BalancingPool interface { | ||
IsEmpty() bool | ||
GetConnection(string) *tarantool.Connection | ||
DeleteConnection(string) *tarantool.Connection | ||
AddConnection(id string, conn *tarantool.Connection) | ||
GetNextConnection() *tarantool.Connection | ||
GetConnections() map[string]*tarantool.Connection | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters