GoLang oci_register_taf_callback

request it (290)
GoLang replacement for PHP's oci_register_taf_callback [edit | history]



Do you know a GoLang replacement for PHP's oci_register_taf_callback? Write it!

PHP oci_register_taf_callback

PHP original manual for oci_register_taf_callback [ show | php.net ]

oci_register_taf_callback

(PHP 7.0 >= 7.0.21, PHP 7 >= 7.1.7, PECL OCI8 >= 2.1.7)

oci_register_taf_callbackRegister a user-defined callback function for Oracle Database TAF

Description

bool oci_register_taf_callback ( resource $connection [, mixed $callbackFn ] )

Registers a user-defined callback function to connection. If connection fails due to instance or network failure, the registered callback function will be invoked for several times during failover. See OCI8 Transparent Application Failover (TAF) Support for information.

When oci_register_taf_callback() is called multiple times, each registration overwrites the previous one.

Use oci_unregister_taf_callback() to explicitly unregister a user-defined callback.

TAF callback registration will NOT be saved across persistent connections, therefore the callback needs to be re-registered for a new persistent connection.

Parameters

connection

An Oracle connection identifier.

callbackFn

A user-defined callback to register for Oracle TAF. It can be a string of the function name or a Closure (anonymous function).

The interface of a TAF user-defined callback function is as follows:

int userCallbackFn ( resource $connection , int $event , int $type )

See the parameter description and an example on OCI8 Transparent Application Failover (TAF) Support page.

Return Values

Returns TRUE on success or FALSE on failure.

See Also