Skip to content

Commit 054327b

Browse files
author
Divjot Arora
authored
Add event package to Makefile and fix gofmt errors (#529)
1 parent 7a653f4 commit 054327b

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
BSON_PKGS = $(shell etc/list_pkgs.sh ./bson)
22
BSON_TEST_PKGS = $(shell etc/list_test_pkgs.sh ./bson)
3+
EVENT_PKGS = $(shell etc/list_pkgs.sh ./event)
4+
EVENT_TEST_PKGS = $(shell etc/list_test_pkgs.sh ./event)
35
MONGO_PKGS = $(shell etc/list_pkgs.sh ./mongo)
46
MONGO_TEST_PKGS = $(shell etc/list_test_pkgs.sh ./mongo)
57
UNSTABLE_PKGS = $(shell etc/list_pkgs.sh ./x)
@@ -8,8 +10,8 @@ TAG_PKG = $(shell etc/list_pkgs.sh ./tag)
810
TAG_TEST_PKG = $(shell etc/list_test_pkgs.sh ./tag)
911
EXAMPLES_PKGS = $(shell etc/list_pkgs.sh ./examples)
1012
EXAMPLES_TEST_PKGS = $(shell etc/list_test_pkgs.sh ./examples)
11-
PKGS = $(BSON_PKGS) $(MONGO_PKGS) $(UNSTABLE_PKGS) $(TAG_PKG) $(EXAMPLES_PKGS)
12-
TEST_PKGS = $(BSON_TEST_PKGS) $(MONGO_TEST_PKGS) $(UNSTABLE_TEST_PKGS) $(TAG_PKG) $(EXAMPLES_TEST_PKGS)
13+
PKGS = $(BSON_PKGS) $(EVENT_PKGS) $(MONGO_PKGS) $(UNSTABLE_PKGS) $(TAG_PKG) $(EXAMPLES_PKGS)
14+
TEST_PKGS = $(BSON_TEST_PKGS) $(EVENT_TEST_PKGS) $(MONGO_TEST_PKGS) $(UNSTABLE_TEST_PKGS) $(TAG_PKG) $(EXAMPLES_TEST_PKGS)
1315
ATLAS_URIS = "$(ATLAS_FREE)" "$(ATLAS_REPLSET)" "$(ATLAS_SHARD)" "$(ATLAS_TLS11)" "$(ATLAS_TLS12)" "$(ATLAS_FREE_SRV)" "$(ATLAS_REPLSET_SRV)" "$(ATLAS_SHARD_SRV)" "$(ATLAS_TLS11_SRV)" "$(ATLAS_TLS12_SRV)"
1416

1517
TEST_TIMEOUT = 600

event/monitoring.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,33 +134,33 @@ type TopologyClosedEvent struct {
134134
// ServerHeartbeatStartedEvent is an event generated when the heartbeat is started.
135135
type ServerHeartbeatStartedEvent struct {
136136
ConnectionID string // The address this heartbeat was sent to with a unique identifier
137-
Awaited bool // If this heartbeat was awaitable
137+
Awaited bool // If this heartbeat was awaitable
138138
}
139139

140140
// ServerHeartbeatSucceededEvent is an event generated when the heartbeat succeeds.
141141
type ServerHeartbeatSucceededEvent struct {
142142
DurationNanos int64
143143
Reply description.Server
144144
ConnectionID string // The address this heartbeat was sent to with a unique identifier
145-
Awaited bool // If this heartbeat was awaitable
145+
Awaited bool // If this heartbeat was awaitable
146146
}
147147

148148
// ServerHeartbeatFailedEvent is an event generated when the heartbeat fails.
149149
type ServerHeartbeatFailedEvent struct {
150150
DurationNanos int64
151151
Failure error
152152
ConnectionID string // The address this heartbeat was sent to with a unique identifier
153-
Awaited bool // If this heartbeat was awaitable
153+
Awaited bool // If this heartbeat was awaitable
154154
}
155155

156156
// ServerMonitor represents a monitor that is triggered for different server events. The client
157157
// will monitor changes on the MongoDB deployment it is connected to, and this monitor reports
158158
// the changes in the client's representation of the deployment. The topology represents the
159159
// overall deployment, and heartbeats are sent to individual servers to check their current status.
160160
type ServerMonitor struct {
161-
ServerDescriptionChanged func(*ServerDescriptionChangedEvent)
162-
ServerOpening func(*ServerOpeningEvent)
163-
ServerClosed func(*ServerClosedEvent)
161+
ServerDescriptionChanged func(*ServerDescriptionChangedEvent)
162+
ServerOpening func(*ServerOpeningEvent)
163+
ServerClosed func(*ServerClosedEvent)
164164
// TopologyDescriptionChanged is called when the topology is locked, so the callback should
165165
// not attempt any operation that requires server selection on the same client.
166166
TopologyDescriptionChanged func(*TopologyDescriptionChangedEvent)

0 commit comments

Comments
 (0)