Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { Device(ctx context.Context, name string) (*Device, error) Up(ctx context.Context, options ConfigureOptions) (*Device, error) Down(ctx context.Context, name string) error Status(ctx context.Context, name string) (bool, error) Stats(ctx context.Context, name string) (*InterfaceStats, error) PeerStats(ctx context.Context, name string, peerPublicKey string) (*PeerStats, error) FindForeignServers(ctx context.Context, knownInterfaces []string) ([]*ForeignServer, error) Close(ctx context.Context) error }
type ConfigureOptions ¶
type ConfigureOptions struct { InterfaceOptions InterfaceOptions WireguardOptions WireguardOptions }
func (ConfigureOptions) Validate ¶
func (o ConfigureOptions) Validate() error
type ForeignInterface ¶
type ForeignServer ¶
type InterfaceOptions ¶
func (InterfaceOptions) Validate ¶
func (o InterfaceOptions) Validate() error
type InterfaceStats ¶
type InterfaceStats struct { RxPackets uint64 TxPackets uint64 RxBytes uint64 TxBytes uint64 RxErrors uint64 TxErrors uint64 RxDropped uint64 TxDropped uint64 Multicast uint64 Collisions uint64 RxLengthErrors uint64 RxOverErrors uint64 RxCrcErrors uint64 RxFrameErrors uint64 RxFifoErrors uint64 RxMissedErrors uint64 TxAbortedErrors uint64 TxCarrierErrors uint64 TxFifoErrors uint64 TxHeartbeatErrors uint64 TxWindowErrors uint64 RxCompressed uint64 TxCompressed uint64 }
type PeerOptions ¶
type PeerOptions struct { PublicKey string Endpoint string AllowedIPs []string PersistentKeepalive int }
func (*PeerOptions) Validate ¶
func (o *PeerOptions) Validate() error
type WireguardOptions ¶
type WireguardOptions struct { PrivateKey string ListenPort *int FirewallMark *int Peers []*PeerOptions }
func (WireguardOptions) Validate ¶
func (o WireguardOptions) Validate() error
Click to show internal directories.
Click to hide internal directories.