File tree Expand file tree Collapse file tree 2 files changed +14
-20
lines changed Expand file tree Collapse file tree 2 files changed +14
-20
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ Versioning](http://semver.org/spec/v2.0.0.html) except to the first release.
1616
1717### Fixed
1818
19+ - Mode type description in the connection_pool subpackage (#208 )
20+
1921## [ 1.8.0] - 2022-08-17
2022
2123### Added
Original file line number Diff line number Diff line change 11package connection_pool
22
3- type Mode uint32
4- type Role uint32
5- type State uint32
6-
73/*
8- Mode parameter:
9-
10- - ANY (use any instance) - the request can be executed on any instance (master or replica).
11-
12- - RW (writeable instance (master)) - the request can only be executed on master.
13-
14- - RO (read only instance (replica)) - the request can only be executed on replica.
15-
16- - PREFER_RO (prefer read only instance (replica)) - if there is one, otherwise fallback to a writeable one (master).
17-
18- - PREFER_RW (prefer write only instance (master)) - if there is one, otherwise fallback to a read only one (replica).
4+ Default mode for each request table:
195
206 Request Default mode
217 ---------- --------------
@@ -30,21 +16,27 @@ Mode parameter:
3016 | select | ANY |
3117 | get | ANY |
3218*/
19+ type Mode uint32
20+
3321const (
34- ANY = iota
35- RW
36- RO
37- PreferRW
38- PreferRO
22+ ANY Mode = iota // The request can be executed on any instance (master or replica).
23+ RW // The request can only be executed on master.
24+ RO // The request can only be executed on replica.
25+ PreferRW // If there is one, otherwise fallback to a writeable one (master).
26+ PreferRO // If there is one, otherwise fallback to a read only one (replica).
3927)
4028
29+ type Role uint32
30+
4131// master/replica role
4232const (
4333 unknown = iota
4434 master
4535 replica
4636)
4737
38+ type State uint32
39+
4840// pool state
4941const (
5042 connConnected = iota
You can’t perform that action at this time.
0 commit comments