device

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: AGPL-3.0 Imports: 32 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
var (
	DEV_CHECKLIST = []rApi.CheckMeta{
		{Name: ServerSvcReady, Title: "Ensuring server service is created"},
		{Name: DnsConfigReady, Title: "Ensuring DNS config is ready"},
		{Name: KeysAndSecretReady, Title: "Ensuring keys and secret are ready"},
		{Name: ConfigReady, Title: "Ensuring device config is ready"},
		{Name: ServicesSynced, Title: "Ensuring services are synced"},
		{Name: ServerReady, Title: "Ensuring server is ready"},
	}

	DEV_DESTROY_CHECKLIST = []rApi.CheckMeta{
		{Name: DeviceDeleted, Title: "Cleaning up device resources"},
	}
)

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