mirror of
https://github.com/getcompanion-ai/computer-host.git
synced 2026-04-19 10:03:21 +00:00
feat(contracts): add published ports, snapshot request, and storage report types
This commit is contained in:
parent
501ae2abd5
commit
26b5d2966d
20 changed files with 893 additions and 81 deletions
|
|
@ -3,6 +3,7 @@ package daemon
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net"
|
||||
"os"
|
||||
"sync"
|
||||
"time"
|
||||
|
|
@ -45,6 +46,9 @@ type Daemon struct {
|
|||
locksMu sync.Mutex
|
||||
machineLocks map[contracthost.MachineID]*sync.Mutex
|
||||
artifactLocks map[string]*sync.Mutex
|
||||
|
||||
publishedPortsMu sync.Mutex
|
||||
publishedPortListeners map[contracthost.PublishedPortID]net.Listener
|
||||
}
|
||||
|
||||
func New(cfg appconfig.Config, store store.Store, runtime Runtime) (*Daemon, error) {
|
||||
|
|
@ -69,6 +73,7 @@ func New(cfg appconfig.Config, store store.Store, runtime Runtime) (*Daemon, err
|
|||
reconfigureGuestIdentity: nil,
|
||||
machineLocks: make(map[contracthost.MachineID]*sync.Mutex),
|
||||
artifactLocks: make(map[string]*sync.Mutex),
|
||||
publishedPortListeners: make(map[contracthost.PublishedPortID]net.Listener),
|
||||
}
|
||||
daemon.reconfigureGuestIdentity = daemon.reconfigureGuestIdentityOverSSH
|
||||
if err := daemon.ensureBackendSSHKeyPair(); err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue