Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Connector. ErrConnectorUnavailable = errors.New("connector unavailable") // DefaultConnectorAddress is the default address of a Connector. DefaultConnectorAddress = "localhost:8000" )
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct { Context context.Context ConnectorAddress string ConnectTimeout time.Duration TestListener *bufconn.Listener // contains filtered or unexported fields }
Factory is used by commands to provide common configuration.
type Option ¶
type Option func(*Factory)
Option is a Factory option.
func ConnectTimeout ¶
ConnectTimeout returns an Option that specifies the timeout for connecting to a Connector.
func ConnectorAddress ¶
ConnectorAddress returns an Option that specifies the address of the Connector service.
func TestListener ¶
TestListener returns an Option that provides a Factory with a *bufconn.Listener. When connecting to a Connector, Factory will use the Listener to dial the gRPC server instead of using the ConnectorAddress.
Click to show internal directories.
Click to hide internal directories.