nodeconfig

package
v0.0.0-...-0bb286d Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package nodeconfig contains Webmesh node configuration rendering.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Options *config.Config
	// contains filtered or unexported fields
}

Config represents a rendered node group config.

func New

func New(opts Options) (*Config, error)

New returns a new node group config.

func (*Config) Checksum

func (c *Config) Checksum() string

Checksum returns the checksum of the config.

func (*Config) Raw

func (c *Config) Raw() []byte

Raw returns the raw config.

type Options

type Options struct {
	// Mesh is the mesh.
	Mesh *meshv1.Mesh
	// Group is the node group.
	Group *meshv1.NodeGroup
	// AdvertiseAddress is the advertise address.
	AdvertiseAddress string
	// PrimaryEndpoint is the primary endpoint.
	PrimaryEndpoint string
	// WireGuardEndpoints are the WireGuard endpoints.
	WireGuardEndpoints []string
	// WireGuardListenPort is the WireGuard listen port.
	WireGuardListenPort int
	// IsBootstrap is true if this is the bootstrap node group.
	IsBootstrap bool
	// BootstrapServers are the bootstrap servers.
	BootstrapServers map[string]string
	// BootstrapVoters are additional bootstrap voters.
	BootstrapVoters []string
	// JoinServer is the join server.
	JoinServer string
	// IsPersistent is true if this is a persistent node group.
	IsPersistent bool
	// CertDir is the cert directory.
	CertDir string
	// DetectEndpoints is true if endpoints should be detected.
	DetectEndpoints bool
	// AllowRemoteDetection is true if remote detection is allowed.
	AllowRemoteDetection bool
	// PersistentKeepalive is the persistent keepalive.
	PersistentKeepalive time.Duration
}

Options are options for generating a node group config.

Jump to

Keyboard shortcuts

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