Documentation
¶
Overview ¶
Package autoblowsim serves an in-process imitation of Autoblow's cloud API for -simulate-motion builds and tests: one simulated Autoblow Ultra and one simulated VacuGlide that accept any token and move nothing. Like the Intiface simulator, it exists so review builds never reach a real device.
Index ¶
- type Options
- type Request
- type Server
- func (s *Server) Close() error
- func (s *Server) ClusterURL(string) (string, error)
- func (s *Server) FailNext(family string, status int, count int)
- func (s *Server) Press(family, event string)
- func (s *Server) Requests() []Request
- func (s *Server) SetOnline(family string, online bool)
- func (s *Server) URL() string
- func (s *Server) UltraPosition() float64
- func (s *Server) VacuGlideSpeed() float64
- func (s *Server) VacuGlideValves() (plusOpen, minusOpen bool, net int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// Heartbeat is the event stream's heartbeat interval; zero means 30 s.
Heartbeat time.Duration
}
Options tune a simulator for tests.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a running simulator.
func (*Server) ClusterURL ¶
ClusterURL maps any reported cluster to this simulator.
func (*Server) UltraPosition ¶
UltraPosition is the simulated Ultra's position now.
func (*Server) VacuGlideSpeed ¶
VacuGlideSpeed is the simulated VacuGlide's motor speed now.
func (*Server) VacuGlideValves ¶
VacuGlideValves reports whether each valve is open and how many times stroke plus opened, net of stroke minus.