cloudflare/cloudflared

Public

mirrored from https://github.com/cloudflare/cloudflaredAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
2023.4.2

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

connection/event.go

28lines · modecode

1package connection
2
3// Event is something that happened to a connection, e.g. disconnection or registration.
4type Event struct {
5 Index uint8
6 EventType Status
7 Location string
8 Protocol Protocol
9 URL string
10}
11
12// Status is the status of a connection.
13type Status int
14
15const (
16 // Disconnected means the connection to the edge was broken.
17 Disconnected Status = iota
18 // Connected means the connection to the edge was successfully established.
19 Connected
20 // Reconnecting means the connection to the edge is being re-established.
21 Reconnecting
22 // SetURL means this connection's tunnel was given a URL by the edge. Used for quick tunnels.
23 SetURL
24 // RegisteringTunnel means the non-named tunnel is registering its connection.
25 RegisteringTunnel
26 // We're unregistering tunnel from the edge in preparation for a disconnect
27 Unregistering
28)
29