kilo/vendor/golang.zx2c4.com/wireguard/wgctrl/internal/wginternal/client.go
leonnicolas bde5c3e7d1
vendor wgctrl
Signed-off-by: leonnicolas <leonloechner@gmx.de>
2022-01-30 17:02:44 +01:00

22 lines
554 B
Go

package wginternal
import (
"errors"
"io"
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
)
// ErrReadOnly indicates that the driver backing a device is read-only. It is
// a sentinel value used in integration tests.
// TODO(mdlayher): consider exposing in API.
var ErrReadOnly = errors.New("driver is read-only")
// A Client is a type which can control a WireGuard device.
type Client interface {
io.Closer
Devices() ([]*wgtypes.Device, error)
Device(name string) (*wgtypes.Device, error)
ConfigureDevice(name string, cfg wgtypes.Config) error
}