Skip to content

Initializer

init(configuration:eventLoopGroup:backgroundLogger:)

Creates a new PostgresClient. Don’t forget to run() the client in a long-running task.
init(configuration: PostgresClient.Configuration, eventLoopGroup: any EventLoopGroup = PostgresClient.defaultEventLoopGroup, backgroundLogger: Logger)

Parameters

configuration

The client’s configuration. See PostgresClient.Configuration for details.

eventLoopGroup

The underlying NIO EventLoopGroup. Defaults to defaultEventLoopGroup.

backgroundLogger

A swift-log Logger to log background messages to. A copy of this logger is also forwarded to the created connections as a background logger.