Documentation

ConnectionPluginInterface extends PluginInterface

Plugin interface for configuring the service client connection.

Connection plugins are applied before client-level plugins, allowing them to set API keys, gRPC metadata, TLS context, and other connection-level options.

Table of Contents

Methods

configureServiceClient()  : ServiceClientInterface
Modify the service client before it is used by the client.
getName()  : string
Unique name identifying this plugin (e.g., "my-org.tracing").

Methods

configureServiceClient()

Modify the service client before it is used by the client.

public configureServiceClient(ServiceClientInterface $serviceClient, callable(ServiceClientInterface): void $next) : ServiceClientInterface

Use this hook to configure connection-level settings such as API keys, gRPC metadata, auth tokens, or context options.

Parameters
$serviceClient : ServiceClientInterface
$next : callable(ServiceClientInterface): void

Calls the next plugin or the final hook.

Return values
ServiceClientInterface

getName()

Unique name identifying this plugin (e.g., "my-org.tracing").

public getName() : string

Used for deduplication and diagnostics.

Return values
string

        
On this page

Search results