cloudflare/cloudflared

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
2025.2.1

Branches

Tags

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

Clone

HTTPS

Download ZIP

connection/event.go

31lines · modecode

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