Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoAutoconfigSources = errors.New("no detectable network config sources") Version = config.Version )
View Source
var C = Config{ SqlitePath: "rhyzome-openwrt.db", HTTPBind: ":8080", GRPCBind: ":9090", RouterBaseImage: "https://git.callpipe.com/api/v4/projects/entanglement.garden%2Fvm-images%2Fopenwrt/jobs/artifacts/main/raw/openwrt.qcow2?job=build", RouterConfig: ClientConfig{ WANDevice: "eth0", }, InternalIPRanges: []string{"10.0.0.0/8"}, }
Functions ¶
func AutoconfigUntilGRPCServerSet ¶
func AutoconfigUntilGRPCServerSet()
func LoadServerConfig ¶
func LoadServerConfig()
LoadServerConfig loads the configuration from a JSON file on the disk
func ReadBiosData ¶
Types ¶
type Autoconfig ¶
type Autoconfig struct { Config ClientConfig `json:"config"` ExtraUCI uci.Tree `json:"extra_uci,omitempty"` }
type ClientConfig ¶
type ClientConfig struct { GRPCServer string `uci:"grpc_server" json:"grpc_server"` StepURL string `uci:"step_url" json:"step_ca"` StepFingerprint string `uci:"step_fp" json:"step_fp"` StepOTT string `uci:"step_ott" json:"step_ott"` WANDevice string `uci:"wan_device" json:"wan_device"` }
func GetClientConfig ¶
func GetClientConfig() (c ClientConfig)
func (ClientConfig) Commit ¶
func (c ClientConfig) Commit() error
type Config ¶
type Config struct { SqlitePath string `json:"sqlite_path"` // SqlitePath is the path to the sqlite database file JWTValidator httpx.JWTValidator `json:"jwt_validator"` HTTPBind string `json:"http_listener"` GRPCBind string `json:"grpc_listener"` PKI grpcx.PKI `json:"pki"` StepFingerprint string `json:"step_fingerprint"` StepProvisioner string `json:"step_provisioner"` StepProvisionerPassword string `json:"step_provisioner_password"` RouterBaseImage string `json:"router_base_image"` RouterConfig ClientConfig `json:"router_config"` RouterExtraConfig uci.Tree `json:"router_extra_config"` SystemCredentials string `json:"system_credentials"` BootstrapMetadataServer string `json:"bootstrap_metadata_server"` InternalIPRanges []string `json:"internal_ip_ranges"` ExternalIPRanges []string `json:"external_ip_ranges"` }
type ProvisioningEndpoints ¶
type ProvisioningEndpoints struct { LibvirtGRPC string `json:"libvirt_grpc"` OpenWRTGRPC string `json:"openwrt_grpc"` Step string `json:"step"` }
ProvisioningEndpoints defines model for ProvisioningEndpoints.
type ProvisioningInfo ¶
type ProvisioningInfo struct { CAFingerprint string `json:"ca_fingerprint"` Domain string `json:"domain"` Endpoints ProvisioningEndpoints `json:"endpoints"` }
ProvisioningInfo defines model for ProvisioningInfo.
Click to show internal directories.
Click to hide internal directories.