mock

package
v0.0.0-...-d16b440 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const JUMPSTARTER_MOCK_PATH = "/tmp/jumpstarter-mock.json"

Variables

This section is empty.

Functions

This section is empty.

Types

type MockConsole

type MockConsole struct {
	// contains filtered or unexported fields
}

func (*MockConsole) Close

func (c *MockConsole) Close() error

func (*MockConsole) Read

func (c *MockConsole) Read(p []byte) (n int, err error)

func (*MockConsole) SetReadTimeout

func (c *MockConsole) SetReadTimeout(t time.Duration) error

func (*MockConsole) Write

func (c *MockConsole) Write(p []byte) (int, error)

type MockDevice

type MockDevice struct {
	// contains filtered or unexported fields
}

func (*MockDevice) AttachStorage

func (d *MockDevice) AttachStorage(connect bool) error

func (*MockDevice) Console

func (d *MockDevice) Console() (harness.ConsoleInterface, error)

func (*MockDevice) Device

func (d *MockDevice) Device() (string, error)

func (*MockDevice) Driver

func (d *MockDevice) Driver() harness.HarnessDriver

func (*MockDevice) GetConfig

func (d *MockDevice) GetConfig() (map[string]string, error)

func (*MockDevice) IsBusy

func (d *MockDevice) IsBusy() (bool, error)

func (*MockDevice) Lock

func (d *MockDevice) Lock() error

func (*MockDevice) Name

func (d *MockDevice) Name() string

func (*MockDevice) Power

func (d *MockDevice) Power(action string) error

func (*MockDevice) Serial

func (d *MockDevice) Serial() (string, error)

func (*MockDevice) SetConfig

func (d *MockDevice) SetConfig(k, v string) error

func (*MockDevice) SetConsoleSpeed

func (d *MockDevice) SetConsoleSpeed(bps int) error

func (*MockDevice) SetControl

func (d *MockDevice) SetControl(key string, value string) error

func (*MockDevice) SetDiskImage

func (d *MockDevice) SetDiskImage(path string, offset uint64) error

func (*MockDevice) SetName

func (d *MockDevice) SetName(name string) error

func (*MockDevice) SetTags

func (d *MockDevice) SetTags(tags []string) error

func (*MockDevice) SetUsbConsole

func (d *MockDevice) SetUsbConsole(name string) error

func (*MockDevice) Tags

func (d *MockDevice) Tags() []string

func (*MockDevice) Unlock

func (d *MockDevice) Unlock() error

func (*MockDevice) Version

func (d *MockDevice) Version() (string, error)

type MockDeviceData

type MockDeviceData struct {
	Name         string            `json:"name"`
	Device       string            `json:"device"`
	Version      string            `json:"version"`
	Serial       string            `json:"serial"`
	Tags         []string          `json:"tags"`
	Config       map[string]string `json:"config"`
	Control      map[string]string `json:"control"`
	Power        string            `json:"power"`
	ConsoleSpeed int               `json:"console_speed"`
	UsbConsole   string            `json:"usb_console"`
	ImagePath    string            `json:"image_path"`
	ImageOffset  uint64            `json:"image_offset"`
	Storage      bool              `json:"storage"`
	Busy         bool              `json:"busy"`
	// contains filtered or unexported fields
}

type MockDriver

type MockDriver struct{}

func (*MockDriver) Description

func (d *MockDriver) Description() string

func (*MockDriver) FindDevices

func (d *MockDriver) FindDevices() ([]harness.Device, error)

func (*MockDriver) Name

func (d *MockDriver) Name() string

type ReadWriter

type ReadWriter struct {
	io.Reader
	io.Writer
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳