factory

package
v0.0.0-...-c2942dc Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPublicIpNotYetSet = fmt.Errorf("public ip not yet set")
)

Functions

This section is empty.

Types

type Peer

type Peer struct {
	*runtime.Scheme
	Peer      v1alpha1.WireguardPeer
	Wireguard v1alpha1.Wireguard
}

func (Peer) Secret

func (fact Peer) Secret(endpoint, pubKey, privKey string) (
	*corev1.Secret, error)

type Wireguard

type Wireguard struct {
	*runtime.Scheme
	v1alpha1.Wireguard
	Peers v1alpha1.WireguardPeerList
}

func (Wireguard) ConfigMap

func (fact Wireguard) ConfigMap() (*corev1.ConfigMap, error)

func (Wireguard) Deployment

func (fact Wireguard) Deployment(configHash string) (*appsv1.Deployment, error)

func (Wireguard) ExtractEndpoint

func (fact Wireguard) ExtractEndpoint(svc corev1.Service) (*string, error)

Returns desired endpoint address for peer

func (Wireguard) Labels

func (fact Wireguard) Labels() map[string]string

Returns labels for the wireguard resource

func (Wireguard) Secret

func (fact Wireguard) Secret(pubKey, privKey string) (*corev1.Secret, error)

Returns desired secret for the current wireguard instance

func (Wireguard) Service

func (fact Wireguard) Service() (*corev1.Service, error)

Jump to

Keyboard shortcuts

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