Documentation
¶
Overview ¶
Package bg implements wrapper for running client in background.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrStartupTimeout = errors.New("bg: client startup timeout")
ErrStartupTimeout is returned by Connect when the client did not become ready within the configured startup timeout. See WithStartupTimeout.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option for Connect.
func WithContext ¶
WithContext sets base context for client.
func WithStartupTimeout ¶ added in v0.22.0
WithStartupTimeout bounds how long Connect waits for the client to become ready before giving up with ErrStartupTimeout.
The client retries connection attempts indefinitely, so without a deadline (either via this option or a cancelable context, see WithContext) Connect can block forever if the connection never becomes ready. A non-positive duration disables the timeout, which is the default.