From ed8c3a92942acfc3d347d7475ecd21c2a19aa3c0 Mon Sep 17 00:00:00 2001 From: Louis Thibault Date: Sat, 25 May 2024 16:59:46 -0400 Subject: [PATCH] Hide *system.Module behind vat.Bootable interface. --- vat/vat.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vat/vat.go b/vat/vat.go index c0ccd8f..aacc17d 100644 --- a/vat/vat.go +++ b/vat/vat.go @@ -6,22 +6,26 @@ import ( "log/slog" "time" + "capnproto.org/go/capnp/v3" "capnproto.org/go/capnp/v3/rpc" "github.com/libp2p/go-libp2p/core/host" "github.com/libp2p/go-libp2p/core/peer" "github.com/libp2p/go-libp2p/core/protocol" "github.com/tetratelabs/wazero/api" - "github.com/wetware/go/system" ) const Proto = "/ww/0.0.0" var _ rpc.Network = (*Network)(nil) +type Bootable interface { + Boot(api.Module) capnp.Client +} + type NetConfig struct { Host host.Host Guest api.Module - System *system.Module + System Bootable DialTimeout time.Duration }