mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-27 20:39:57 +00:00
TUN-3593: /ready endpoint for k8s readiness. Move tunnel events out of UI package, into connection package.
This commit is contained in:
25
connection/event.go
Normal file
25
connection/event.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package connection
|
||||
|
||||
// Event is something that happened to a connection, e.g. disconnection or registration.
|
||||
type Event struct {
|
||||
Index uint8
|
||||
EventType Status
|
||||
Location string
|
||||
URL string
|
||||
}
|
||||
|
||||
// Status is the status of a connection.
|
||||
type Status int
|
||||
|
||||
const (
|
||||
// Disconnected means the connection to the edge was broken.
|
||||
Disconnected Status = iota
|
||||
// Connected means the connection to the edge was successfully established.
|
||||
Connected
|
||||
// Reconnecting means the connection to the edge is being re-established.
|
||||
Reconnecting
|
||||
// SetURL means this connection's tunnel was given a URL by the edge. Used for free tunnels.
|
||||
SetURL
|
||||
// RegisteringTunnel means the non-named tunnel is registering its connection.
|
||||
RegisteringTunnel
|
||||
)
|
Reference in New Issue
Block a user