Documentation
¶
Overview ¶
Package stubbackend stands in for the external systems the real built-in AutoFlow modules talk to, inside the process that runs them: an HTTP server in place of the GitLab REST API and a counting sink in place of the events platform. Both answer deterministically, so a generated flow that calls a real module has a known outcome without a GitLab or an events platform anywhere near the run.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
Publisher accepts every event, counts it and drops it. The zero value is ready to use.
It stands in for the events platform, which the event module refuses to load without: a run that needs emit to happen does not need the events to be readable afterwards, only countable.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server answers every request with a deterministic response.
func Start ¶
Start listens on a loopback port and serves until Close; ctx bounds taking the port, not the server's life. log carries a serve error, which is the one failure a caller cannot be handed by Start.
func (*Server) Close ¶
func (s *Server) Close()
Close stops serving and waits for the serving goroutine.