24 lines
1.2 KiB
Go
24 lines
1.2 KiB
Go
package simulator
|
|
|
|
// Service contains functions for managing multiple simulators
|
|
type Service interface {
|
|
// List return the current managed simulators
|
|
List() []Simulator
|
|
// Add adds a new simulator in the list of managed simulators. The simulator is prepared to start, but is
|
|
// not started yet.
|
|
Add(uri string, version string) (Info, error)
|
|
// Get returns the simulator with the given deviceUID or an ErrNotFound it returned when the simulator is
|
|
// not found.
|
|
Get(deviceUID string) (Simulator, error)
|
|
// Remove removes the simulator of the list of managed simulators. This simulator must be stopped in order
|
|
// to succeeds. An ErrNotFound is returned when the simulator is not found. An ErrNotStopped is returned when the
|
|
// simulator is still running.
|
|
Remove(deviceUID string) error
|
|
// Start starts the simulator with the given deviceUID. An ErrNotFound is returned when the simulator is
|
|
// not found. An ErrAlreadyRunning is returned when the simulator is already running.
|
|
Start(deviceUID string) error
|
|
// Stop stops the simulator with the given deviceUID. An ErrNotFound is returned when the simulator is
|
|
// not found. An ErrAlreadyStopped is returned when the simulator is already stopped.
|
|
Stop(deviceUID string) error
|
|
}
|