Documentation
¶
Index ¶
- Constants
- func ConfigureInterface(name, cidr string) error
- func CreateTAP(name string) (int, error)
- func DeleteInterface(name string) error
- func GenerateMAC(vmID string) string
- func SetMTU(name string, mtu int) error
- func SetupIPForwarding() error
- type LinuxBackend
- type LinuxMachine
- func (m *LinuxMachine) Close(ctx context.Context) error
- func (m *LinuxMachine) Exec(ctx context.Context, command string, opts *api.ExecOptions) (*api.ExecResult, error)
- func (m *LinuxMachine) ExecInteractive(ctx context.Context, command string, opts *api.ExecOptions, rows, cols uint16, ...) (int, error)
- func (m *LinuxMachine) NetworkFD() (int, error)
- func (m *LinuxMachine) PID() int
- func (m *LinuxMachine) RootfsPath() string
- func (m *LinuxMachine) Start(ctx context.Context) error
- func (m *LinuxMachine) Stop(ctx context.Context) error
- func (m *LinuxMachine) TapName() string
- func (m *LinuxMachine) VsockCID() uint32
- func (m *LinuxMachine) VsockFD() (int, error)
- func (m *LinuxMachine) VsockPath() string
- func (m *LinuxMachine) Wait(ctx context.Context) error
Constants ¶
View Source
const ( // VsockPortExec is the port for command execution VsockPortExec = 5000 // VsockPortVFS is the port for VFS protocol VsockPortVFS = 5001 // VsockPortReady is the port for ready signal VsockPortReady = 5002 )
View Source
const (
TUNSETPERSIST = 0x400454cb
)
Variables ¶
This section is empty.
Functions ¶
func ConfigureInterface ¶
func DeleteInterface ¶
func GenerateMAC ¶
func SetupIPForwarding ¶
func SetupIPForwarding() error
Types ¶
type LinuxBackend ¶
type LinuxBackend struct{}
func NewLinuxBackend ¶
func NewLinuxBackend() *LinuxBackend
func (*LinuxBackend) Name ¶
func (b *LinuxBackend) Name() string
type LinuxMachine ¶
type LinuxMachine struct {
// contains filtered or unexported fields
}
func (*LinuxMachine) Exec ¶
func (m *LinuxMachine) Exec(ctx context.Context, command string, opts *api.ExecOptions) (*api.ExecResult, error)
func (*LinuxMachine) ExecInteractive ¶
func (m *LinuxMachine) ExecInteractive(ctx context.Context, command string, opts *api.ExecOptions, rows, cols uint16, stdin io.Reader, stdout io.Writer, resizeCh <-chan [2]uint16) (int, error)
ExecInteractive executes a command with PTY support for interactive sessions
func (*LinuxMachine) NetworkFD ¶
func (m *LinuxMachine) NetworkFD() (int, error)
func (*LinuxMachine) PID ¶
func (m *LinuxMachine) PID() int
func (*LinuxMachine) RootfsPath ¶
func (m *LinuxMachine) RootfsPath() string
func (*LinuxMachine) TapName ¶
func (m *LinuxMachine) TapName() string
TapName returns the TAP interface name
func (*LinuxMachine) VsockCID ¶
func (m *LinuxMachine) VsockCID() uint32
VsockCID returns the guest CID
func (*LinuxMachine) VsockFD ¶
func (m *LinuxMachine) VsockFD() (int, error)
func (*LinuxMachine) VsockPath ¶
func (m *LinuxMachine) VsockPath() string
VsockPath returns the vsock UDS path for connecting to guest services
Click to show internal directories.
Click to hide internal directories.