Documentation
¶
Index ¶
Constants ¶
View Source
const ( ErrFailedToBuildSeedGetRequest = "failed to build get request for seed" // Currently only a single interface is supported and defaults to this value. In the future we // will probably want to support multiple interfaces (e.g. one for trusted mobile clients and another for federated servers) DefaultWireguardInterface = "wg0" DefaultSTUNServerAddress = "locator1.home-cloud.io:3478" DefaultLocatorAddress = "https://locator1.home-cloud.io" DefaultDaemonAddress = "http://daemon.home-cloud-system" )
View Source
const ( DefaultAutoUpdateSystemSchedule = "0 1 * * *" LatestReleaseManifestURL = "https://github.com/home-cloud-io/core/releases/latest/download/manifest.yaml" ErrDeviceAlreadySetup = "device already setup" ErrFailedToCreateSettings = "failed to create device settings" ErrFailedToGetSettings = "failed to get device settings" ErrFailedToSetSettings = "failed to save device settings" )
View Source
const ( ErrFailedToGenPubKey = "failed to generate public key" ErrFailedToGenPrivKey = "failed to generate private key" ErrFailedToSetPeerConfig = "failed to save peer config to key/val store" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Containers ¶
type Controller ¶
func NewController ¶
func NewController(logger chassis.Logger, kclient k8sclient.System, actl apps.Controller) Controller
type Device ¶
type Device interface {
// GetServerSettings returns the current server settings after filtering out the
// admin username and password.
GetServerSettings(ctx context.Context, logger chassis.Logger) (*v1.DeviceSettings, error)
// SetServerSettings updates the settings on the server with the given values
SetServerSettings(ctx context.Context, logger chassis.Logger, settings *v1.DeviceSettings) error
// AutoUpdate will check for and install the latest Home Cloud version on a schedule
AutoUpdate(ctx context.Context, logger chassis.Logger, schedule string)
// Update will check for and install the latest Home Cloud version once
Update(ctx context.Context, logger chassis.Logger) error
// GetComponentVersions returns all the versions of system components (server, daemon, etc.)
GetComponentVersions(ctx context.Context, logger chassis.Logger) (*v1.GetComponentVersionsResponse, error)
}
type OS ¶
type OS interface {
// SystemStats calls the daemon and returns the reported system stats (CPU, RAM, etc.)
SystemStats(ctx context.Context, loger chassis.Logger) (*dv1.SystemStats, error)
// EnableWireguard will initialize the Wireguard server
EnableWireguard(ctx context.Context, logger chassis.Logger) error
// DisableWireguard will disable the Wireguard server
DisableWireguard(ctx context.Context, logger chassis.Logger) error
}
Click to show internal directories.
Click to hide internal directories.