Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: more dial failure types #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading