Go-based network automation with YANG models, gRPC, Ansible, Terraform, and Kubernetes integration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
21 lines
413 B
Go
21 lines
413 B
Go
package mesh
|
|
|
|
import "time"
|
|
|
|
// PeerState represents the connectivity state of a WireGuard peer.
|
|
type PeerState string
|
|
|
|
const (
|
|
PeerStateActive PeerState = "active"
|
|
PeerStateDead PeerState = "dead"
|
|
PeerStatePending PeerState = "pending"
|
|
)
|
|
|
|
// Peer represents a WireGuard mesh peer.
|
|
type Peer struct {
|
|
PublicKey string
|
|
Endpoint string
|
|
AllowedIPs []string
|
|
State PeerState
|
|
LastSeen time.Time
|
|
}
|