Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Conn ¶
Conn returns the connection to the test database, for tests which create managers of their own
func Main ¶
func Main(m *testing.M, opts ...broadcaster.Opt)
Main initializes a PostgreSQL pool, and a manager, on a channel of its own, whose event loop runs, logging to the log which Logs returns, before running the tests. If PGBROADCASTER_TEST_DATABASE_URL is set, it connects to that server; otherwise it starts a PostgreSQL container.
func Start ¶
func Start(conn pg.PoolConn, opts ...broadcaster.Opt) (*broadcaster.Manager, func() error, error)
Start creates a manager on a channel of its own, so the tests of a package don't hear those of others which run at the same time against the same database, with the options, which can still set the channel, and runs it, until the returned function stops it, once it's listening. It's for the tests of the modules which listen with a broadcaster.
Types ¶
This section is empty.