-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.go
More file actions
38 lines (30 loc) · 1.46 KB
/
types.go
File metadata and controls
38 lines (30 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package relay
// -----------------------------------------------------------------------------
// Core Identity Types
// -----------------------------------------------------------------------------
// AgentID uniquely identifies an agent in the mesh.
// Agents are the remote endpoints that provide access to resources (shells, tunnels, etc.).
type AgentID string
// ClientID uniquely identifies a connected client.
// Clients are the callers that request sessions with agents.
type ClientID string
// SessionID uniquely identifies an active session between a client and an agent.
// Sessions are multiplexed over a single agent connection.
type SessionID string
// Capability represents a specific feature or resource an agent can provide.
type Capability string
// Common capabilities for agents.
// These are the three fundamental primitives that all other features are built on.
const (
CapabilityPTY Capability = "pty" // Interactive terminal
CapabilityTCPTunnel Capability = "tunnel:tcp" // TCP port forwarding
CapabilityUDPTunnel Capability = "tunnel:udp" // UDP port forwarding
)
// SessionType identifies the kind of session being established.
type SessionType string
// Defined session types - the three fundamental primitives.
const (
SessionTypePTY SessionType = "pty" // Interactive terminal
SessionTypeTCPTunnel SessionType = "tunnel:tcp" // TCP port forwarding
SessionTypeUDPTunnel SessionType = "tunnel:udp" // UDP port forwarding
)