metadata-api: support dnsmasq (#3115)

This commit is contained in:
3u13r 2024-05-24 15:14:16 +02:00 committed by GitHub
parent 37e46b98c2
commit 21c30ebb76
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 304 additions and 270 deletions

View file

@ -0,0 +1,24 @@
//go:build !cgo
/*
Copyright (c) Edgeless Systems GmbH
SPDX-License-Identifier: AGPL-3.0-only
*/
package virtwrapper
import (
"errors"
"github.com/edgelesssys/constellation/v2/hack/qemu-metadata-api/dhcp"
)
// Connect wraps a libvirt connection.
type Connect struct{}
// GetDHCPLeases returns the underlying DHCP leases.
// This function errors if CGO is disabled.
func (n *Connect) GetDHCPLeases() ([]dhcp.NetworkDHCPLease, error) {
return nil, errors.New("using virtwrapper requires building with CGO")
}