We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
peerAccessStatus
1 parent 0c5bb49 commit 0f9332bCopy full SHA for 0f9332b
server.go
@@ -193,6 +193,23 @@ const (
193
peerStatusProtected
194
)
195
196
+// String returns a human-readable representation of the status code.
197
+func (p peerAccessStatus) String() string {
198
+ switch p {
199
+ case peerStatusRestricted:
200
+ return "restricted"
201
+
202
+ case peerStatusTemporary:
203
+ return "temporary"
204
205
+ case peerStatusProtected:
206
+ return "protected"
207
208
+ default:
209
+ return "unknown"
210
+ }
211
+}
212
213
// peerSlotStatus determines whether a peer gets access to one of our free
214
// slots or gets to bypass this safety mechanism.
215
type peerSlotStatus struct {
0 commit comments