meshutil

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package meshutil contains helpers for computing networking information from the mesh.

Index

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

func MeshNodesEqual(a, b *v1.MeshNode) bool

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL