Documentation ¶
Overview ¶
Package meshutil contains helpers for computing networking information from the mesh.
Index ¶
- func FeaturePortEqual(a, b *v1.FeaturePort) bool
- func FeaturePortsEqual(a, b []*v1.FeaturePort) bool
- func MeshNodesEqual(a, b *v1.MeshNode) bool
- func WireGuardPeerEqual(a, b *v1.WireGuardPeer) bool
- func WireGuardPeersEqual(a, b []*v1.WireGuardPeer) bool
- func WireGuardPeersFor(ctx context.Context, st storage.MeshStorage, peerID string) ([]*v1.WireGuardPeer, error)
- type SortedWireGuardPeers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FeaturePortEqual ¶
func FeaturePortEqual(a, b *v1.FeaturePort) bool
FeaturePortEqual compares two feature ports for equality.
func FeaturePortsEqual ¶
func FeaturePortsEqual(a, b []*v1.FeaturePort) bool
FeaturePortsEqual compares two feature ports for equality.
func MeshNodesEqual ¶
MeshNodesEqual compares two mesh nodes for equality.
func WireGuardPeerEqual ¶
func WireGuardPeerEqual(a, b *v1.WireGuardPeer) bool
WireGuardPeerEqual compares two WireGuard peers for equality.
func WireGuardPeersEqual ¶
func WireGuardPeersEqual(a, b []*v1.WireGuardPeer) bool
WireGuardPeersEqual recurses the WireGuard peers and compares them for equality. Both lists are sorted by ID first.
func WireGuardPeersFor ¶
func WireGuardPeersFor(ctx context.Context, st storage.MeshStorage, peerID string) ([]*v1.WireGuardPeer, error)
WireGuardPeersFor returns the WireGuard peers for the given peer ID. Peers are filtered by network ACLs.
Types ¶
type SortedWireGuardPeers ¶
type SortedWireGuardPeers []*v1.WireGuardPeer
SortedWireGuardPeers implements a sort.Interface for []*v1.WireGuardPeer.
func (SortedWireGuardPeers) Len ¶
func (s SortedWireGuardPeers) Len() int
func (SortedWireGuardPeers) Less ¶
func (s SortedWireGuardPeers) Less(i, j int) bool
func (SortedWireGuardPeers) Swap ¶
func (s SortedWireGuardPeers) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.