More svc effect handlers (#2610)

* complete get_primary_url fn

* complete clear_network_interfaces fn

* formatting

* complete remove_address fn

* get_system_smtp wip

* complete get_system_smtp and set_system_smtp

* add SetSystemSmtpParams struct

* add set_system_smtp subcommand

* Remove 'Copy' implementation from `HostAddress`

Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com>

* Refactor `get_host_primary` fn and clone  resulting `HostAddress`

Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com>

* misc fixes and debug info

* seed hosts with a tor address

---------

Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com>
Co-authored-by: Aiden McClelland <me@drbonez.dev>
This commit is contained in:
Dominion5254
2024-05-10 13:20:24 -06:00
committed by GitHub
parent 30aabe255b
commit 800b0763e4
31 changed files with 259 additions and 97 deletions

View File

@@ -17,7 +17,7 @@ export class DockerProcedureContainer {
data: DockerProcedure,
volumes: { [id: VolumeId]: Volume },
) {
const overlay = await Overlay.of(effects, data.image)
const overlay = await Overlay.of(effects, { id: data.image })
if (data.mounts) {
const mounts = data.mounts

View File

@@ -53,7 +53,7 @@ export class MainLoop {
}
const daemon = await daemons.runDaemon()(
this.effects,
this.system.manifest.main.image,
{ id: this.system.manifest.main.image },
currentCommand,
{
overlay: dockerProcedureContainer.overlay,

View File

@@ -96,7 +96,7 @@ export class PolyfillEffects implements oet.Effects {
return startSdk
.runCommand(
this.effects,
this.manifest.main.image,
{ id: this.manifest.main.image },
[command, ...(args || [])],
{},
)
@@ -118,7 +118,7 @@ export class PolyfillEffects implements oet.Effects {
const daemon = dockerProcedureContainer.then((dockerProcedureContainer) =>
daemons.runDaemon()(
this.effects,
this.manifest.main.image,
{ id: this.manifest.main.image },
[input.command, ...(input.args || [])],
{
overlay: dockerProcedureContainer.overlay,
@@ -143,7 +143,7 @@ export class PolyfillEffects implements oet.Effects {
await startSdk
.runCommand(
this.effects,
this.manifest.main.image,
{ id: this.manifest.main.image },
["chown", "--recursive", input.uid, `/drive/${input.path}`],
{
mounts: [
@@ -178,7 +178,7 @@ export class PolyfillEffects implements oet.Effects {
await startSdk
.runCommand(
this.effects,
this.manifest.main.image,
{ id: this.manifest.main.image },
["chmod", "--recursive", input.mode, `/drive/${input.path}`],
{
mounts: [