Skip to content

Commit

Permalink
feat: add additional dial failure types
Browse files Browse the repository at this point in the history
  • Loading branch information
adklempner committed Oct 4, 2024
1 parent 862d7d7 commit d499564
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 3 deletions.
29 changes: 26 additions & 3 deletions lib/database/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions lib/database/sql/000023_dial_failure_types.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
INSERT INTO dial_error_types (id, name)
SELECT v.id, v.name
FROM (VALUES
(0, 'Unknown'),
(1, 'I/O Timeout'),
(2, 'Connection Refused'),
(3, 'Relay Circuit Failed'),
(4, 'Relay No Reservation'),
(5, 'Security Negotiation Failed'),
(6, 'Concurrent Dial Succeeded'),
(7, 'Concurrent Dial Failed'),
(8, 'Connections Per IP Limit Exceeded'),
(9, 'Stream Reset'),
(10, 'Relay Resource Limit Exceeded'),
(11, 'Error Opening Hop Stream to Relay'),
(12, 'Dial Backoff')
) AS v(id, name)
WHERE NOT EXISTS (
SELECT 1 FROM dial_error_types WHERE id = v.id
);
5 changes: 5 additions & 0 deletions pkg/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ const (
ErrorSecurityNegotiationFailed
ErrorConcurrentDialSucceeded
ErrorConcurrentDialFailed
ErrorConnectionsPerIPLimitExceeded
ErrorStreamReset
ErrorRelayResourceLimitExceeded
ErrorOpeningHopStreamToRelay
ErrorDialBackoff
)

type TelemetryRequest struct {
Expand Down

0 comments on commit d499564

Please sign in to comment.