Documentation
¶
Overview ¶
Package gateway implements enrollment, discovery, signaling, encrypted relay fallback, and fleet administration. It does not schedule or execute application work.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuditEvent ¶ added in v0.5.0
type AuditEvent struct {
ID int64 `json:"id"`
At time.Time `json:"at"`
UserID string `json:"userId"`
// Fleet is the account name for UserID, resolved when events are listed.
Fleet string `json:"fleet,omitempty"`
// Actor is a browser login, an account name for its key, or "@operator".
Actor string `json:"actor"`
Via string `json:"via"`
KeyID string `json:"keyId,omitempty"`
Action string `json:"action"`
Target string `json:"target,omitempty"`
TargetID string `json:"targetId,omitempty"`
Detail string `json:"detail,omitempty"`
// SourceIP is the direct TCP peer. Behind a reverse proxy it is the proxy.
SourceIP string `json:"sourceIp,omitempty"`
}
AuditEvent records one management action or browser sign-in. It never contains passwords, tokens, installation links, or execution arguments.
type Gateway ¶
type Gateway struct {
// contains filtered or unexported fields
}
Gateway manages fleet membership and connectivity for nodes and clients.
func (*Gateway) StartUpdates ¶
StartUpdates begins managed rollout after the server is configured. A fresh heartbeat and an acknowledged idle reservation are required from every online peer before any binary replacement can start.
type GatewayMetrics ¶
type GatewayMetrics struct {
Limits Limits `json:"limits"`
AdmittedConnections int `json:"admittedConnections"`
ActiveHandshakes int `json:"activeHandshakes"`
QueuedPacketBytes int64 `json:"queuedPacketBytes"`
PeakQueuedPacketBytes int64 `json:"peakQueuedPacketBytes"`
AdmissionRejects int64 `json:"admissionRejects"`
NewIdentityRejects int64 `json:"newIdentityRejects"`
PacketQueueRejects int64 `json:"packetQueueRejects"`
HandshakeCount int64 `json:"handshakeCount"`
HandshakeDurationSeconds float64 `json:"handshakeDurationSeconds"`
PacketWriteFailures int64 `json:"packetWriteFailures"`
ConnectedMachines int `json:"connectedMachines"`
ConnectedClients int `json:"connectedClients"`
QueuedRelayBytes int64 `json:"queuedRelayBytes"`
Connects int64 `json:"connects"`
Disconnects int64 `json:"disconnects"`
AuthFailures int64 `json:"authFailures"`
RelayPackets int64 `json:"relayPackets"`
RelayBytes int64 `json:"relayBytes"`
// RelayOverflows counts relay sessions closed because their destination's
// queue was full. The destination's gateway connection stays open.
RelayOverflows int64 `json:"relayOverflows"`
// RelayDropped counts signaling packets dropped for a full destination queue.
RelayDropped int64 `json:"relayDropped"`
}
GatewayMetrics is the superuser diagnostic snapshot.
type Hello ¶
type Hello struct {
Version string `json:"version"`
Node model.Node `json:"node"`
// NodeBytes, when present, is the exact signed registration. Gateways that
// advertise nodeBytes decode it leniently, so a newer node's unknown fields
// no longer invalidate a signature computed over a re-encoding.
NodeBytes []byte `json:"nodeBytes,omitempty"`
Client bool `json:"client,omitempty"`
GatewayHeartbeat bool `json:"gatewayHeartbeat,omitempty"`
RelayDrain bool `json:"relayDrain,omitempty"`
OwnerKey []byte `json:"ownerKey,omitempty"`
OwnerSignature []byte `json:"ownerSignature,omitempty"`
Signature []byte `json:"signature"`
}
func (Hello) OwnerMessage ¶
OwnerMessage authorizes this particular TLS identity to act for a stable client owner. A bearer credential alone cannot impersonate another owner.
type Limits ¶ added in v0.5.3
type Limits struct {
Connections int `json:"connections"`
ConnectionsPerAccount int `json:"connectionsPerAccount"`
ClientsPerAccount int `json:"clientsPerAccount"`
NodesPerAccount int `json:"nodesPerAccount"`
Handshakes int `json:"handshakes"`
HandshakesPerAccount int `json:"handshakesPerAccount"`
NewIdentitiesPerMinute int `json:"newIdentitiesPerMinute"`
QueuedBytes int64 `json:"queuedBytes"`
QueuedBytesPerAccount int64 `json:"queuedBytesPerAccount"`
}
Limits bound live admission and retained packet buffers, not process RSS or durable fleet history. Zero option fields select defaults; negatives fail.
func DefaultLimits ¶ added in v0.5.3
func DefaultLimits() Limits
type RelayDrainRequest ¶ added in v0.5.7
RelayDrainRequest is a bounded, gateway-authenticated transport instruction. It never cancels a stream and expires even if its resume packet is lost.
Source Files
¶
- audit.go
- auth.go
- clients.go
- console.go
- console_sessions.go
- database.go
- enrollment.go
- gateway.go
- health.go
- heartbeat.go
- hybrid.go
- identity_cache.go
- lan.go
- limits.go
- machines.go
- maintenance.go
- observation.go
- packet_queue.go
- proxy.go
- proxy_managed.go
- proxy_management.go
- relay.go
- relay_scheduler.go
- releases.go
- secrets.go
- startup.go
- status.go
- stun.go
- updates.go
- users.go
- wake.go