device

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEVICE_KEY_PREFIX     = "wg-keys-"
	DEVICE_CONFIG_PREFIX  = "wg-configs-"
	WG_SERVER_NAME_PREFIX = "wg-server-"
	DNS_NAME_PREFIX       = "wg-dns-"
)
View Source
const (
	NSReady        string = "namespace-ready"
	DnsConfigReady string = "dns-config-ready"

	KeysAndSecretReady string = "keys-and-secret-ready"
	ServerSvcReady     string = "server-svc-ready"
	ConfigReady        string = "config-ready"
	ServicesSynced     string = "services-synced"
	ServerReady        string = "server-ready"

	DeviceDeleted string = "device-deleted"
)

Variables

This section is empty.

Functions

func GenerateWgKeys

func GenerateWgKeys() ([]byte, []byte, error)

func GetRemoteDeviceIp

func GetRemoteDeviceIp(deviceOffcet int64) ([]byte, error)

Types

type Data

type Data struct {
	ServerIp         string
	ServerPrivateKey string
	Peers            []Peer
	DNS              string
}

type Peer

type Peer struct {
	PublicKey  string
	AllowedIps string
}

type Reconciler

type Reconciler struct {
	client.Client
	Scheme *runtime.Scheme

	Name string

	Env *env.Env
	// contains filtered or unexported fields
}

func (*Reconciler) GetName

func (r *Reconciler) GetName() string

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)

func (*Reconciler) SetupWithManager

func (r *Reconciler) SetupWithManager(mgr ctrl.Manager, logger logging.Logger) error

Jump to

Keyboard shortcuts

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