From fc2b083017012b4afbd9324fc6525e34a19aa0b3 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Tue, 2 Jul 2024 17:01:07 +0200 Subject: vm/dispatcher: introduce a generic instance pool The pool operates on a low level and assumes that there's one default activity (=fuzzing) that is performed by the VMs and that there are also occasional non-default activities that must be performed by some VMs (=bug reproduction). --- pkg/rpcserver/rpcserver.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pkg/rpcserver') diff --git a/pkg/rpcserver/rpcserver.go b/pkg/rpcserver/rpcserver.go index c50f483b1..0ad15c040 100644 --- a/pkg/rpcserver/rpcserver.go +++ b/pkg/rpcserver/rpcserver.go @@ -183,11 +183,6 @@ func (serv *Server) Close() error { return serv.serv.Close() } -type VMState struct { - State int - Timestamp time.Time -} - const ( StateOffline = iota StateBooting @@ -195,6 +190,11 @@ const ( StateStopping ) +type VMState struct { + State int + Timestamp time.Time +} + func (serv *Server) VMState() map[string]VMState { serv.mu.Lock() defer serv.mu.Unlock() -- cgit mrf-deployment