Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SimulController ¶
type SimulController struct {
// contains filtered or unexported fields
}
SimulController is a simulative implementation of a UserController.
func New ¶
func New(id int, user user.User, status chan<- control.UserStatus) (*SimulController, error)
New creates and initializes a new SimulController with given parameters. An id is provided to identify the controller, a User is passed as the entity to be controlled and a UserStatus channel is passed to communicate errors and information about the user's status.
func (*SimulController) Run ¶
func (c *SimulController) Run()
Run begins performing a set of user actions in a loop. It keeps on doing it until Stop() is invoked. This is also a blocking function, so it is recommended to invoke it inside a goroutine.
func (*SimulController) SetRate ¶
func (c *SimulController) SetRate(rate float64) error
SetRate sets the relative speed of execution of actions by the user.
Click to show internal directories.
Click to hide internal directories.