peer

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package peer provides networkservice.NetworkService{Client,Server} chain elements for wireguard peer creating

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(ctx context.Context, isClient bool, key string)

Delete deletes the bool indicating that the chain element should wait for the swIfIndex to be up, stored in per Connection.Id metadata

func Load

func Load(ctx context.Context, isClient bool, key string) (value uint32, ok bool)

Load returns the bool indicating that the chain element should wait for the swIfIndex to be up, stored in per Connection.Id metadata, or nil if no value is present. The ok result indicates whether value was found in the per Connection.Id metadata.

func LoadAndDelete

func LoadAndDelete(ctx context.Context, isClient bool, key string) (value uint32, ok bool)

LoadAndDelete deletes the bool indicating that the chain element should wait for the swIfIndex to be up, stored in per Connection.Id metadata, returning the previous value if any. The loaded result reports whether the key was present.

func LoadOrStore

func LoadOrStore(ctx context.Context, isClient bool, key string, peerIdx uint32) (value uint32, ok bool)

LoadOrStore returns the existing bool indicating that the chain element should wait for the swIfIndex to be up, stored in per Connection.Id metadata if present. Otherwise, it stores and returns the given nterface_types.InterfaceIndex. The loaded result is true if the value was loaded, false if stored.

func NewClient

NewClient - creates peer for the wireguard remote mechanism

func NewServer

NewServer - creates peer for the wireguard remote mechanism

func Store

func Store(ctx context.Context, isClient bool, key string, peerIdx uint32)

Store sets the bool indicating that the chain element should wait for the swIfIndex to be up, stored in per Connection.Id metadata.

Types

This section is empty.

Jump to

Keyboard shortcuts

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