channel

package
v0.83.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2026 License: BSD-3-Clause, AGPL-3.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildApiBlackBoxWithDBState

func BuildApiBlackBoxWithDBState(t testing_tools.TB, sqlFile string, expectedPeerUpdate *network_map.UpdateMessage, validateUpdate bool) (http.Handler, account.Manager, chan struct{})

func BuildApiBlackBoxWithDBStateAndPeerChannel added in v0.67.2

func BuildApiBlackBoxWithDBStateAndPeerChannel(t testing_tools.TB, sqlFile string) (http.Handler, account.Manager, <-chan *network_map.UpdateMessage)

BuildApiBlackBoxWithDBStateAndPeerChannel creates the API handler and returns the peer update channel directly so tests can verify updates inline.

func BuildApiBlackBoxWithRouters added in v0.83.0

func BuildApiBlackBoxWithRouters(t testing_tools.TB, sqlFile string) (root http.Handler, apiRouter *mux.Router, am account.Manager)

BuildApiBlackBoxWithRouters builds the API like BuildApiBlackBoxWithDBState, laid out the way BaseServer serves it: the shared middleware runs on the returned root router and the API sits on a /api subrouter without it. A handler mounted on apiRouter is authenticated by the root router, and a handler that dispatches to apiRouter in-process, as the MCP endpoint does, reaches the REST handlers on the identity already in the request context. Mount such handlers on apiRouter before serving requests through root.

func PeerShouldNotReceiveAnyUpdate added in v0.67.2

func PeerShouldNotReceiveAnyUpdate(t testing_tools.TB, updateMessage <-chan *network_map.UpdateMessage)

PeerShouldNotReceiveAnyUpdate verifies no peer update message is received.

func PeerShouldReceiveAnyUpdate added in v0.67.2

func PeerShouldReceiveAnyUpdate(t testing_tools.TB, updateMessage <-chan *network_map.UpdateMessage) *network_map.UpdateMessage

PeerShouldReceiveAnyUpdate waits for a peer update message and returns it. Fails the test if no update is received within timeout.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL