cloudflare/cloudflared

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
2021.12.4

Branches

Tags

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

Clone

HTTPS

Download ZIP

connection/event.go

27lines · 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 URL string
9}
10
11// Status is the status of a connection.
12type Status int
13
14const (
15 // Disconnected means the connection to the edge was broken.
16 Disconnected Status = iota
17 // Connected means the connection to the edge was successfully established.
18 Connected
19 // Reconnecting means the connection to the edge is being re-established.
20 Reconnecting
21 // SetURL means this connection's tunnel was given a URL by the edge. Used for quick tunnels.
22 SetURL
23 // RegisteringTunnel means the non-named tunnel is registering its connection.
24 RegisteringTunnel
25 // We're unregistering tunnel from the edge in preparation for a disconnect
26 Unregistering
27)