stoppable

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterServiceForTestCleanup

func RegisterServiceForTestCleanup(testUuid string, service Stoppable)

RegisterServiceForTestCleanup registers a service for cleanup. All services are organized by a uuid per test case.

func StopServices

func StopServices(t *testing.T, testUuid string)

StopServices stops all services that were registered for cleanup for a given test, identified by uuid. It also removes the services from the global map.

Types

type Stoppable

type Stoppable interface {
	Stop()
}

Stoppable is an interface for objects that can be stopped. A global map of these objects is maintained here. This map is used to stop all running services that aren't cleaned up by the Network test object for our cli test suite. Services are organized by a uuid per test case, which is that test's GRPC address, since the network package chooses these to not overlap, and these are easily accessible to the protocol from the app.New method, where many services are started, and which does not have a reference to an sdk context.

Jump to

Keyboard shortcuts

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