GoLang TokyoTyrant::setMaster

request it (307)
GoLang replacement for PHP's TokyoTyrant::setMaster [edit | history]



Do you know a GoLang replacement for PHP's TokyoTyrant::setMaster? Write it!

PHP TokyoTyrant::setMaster

PHP original manual for TokyoTyrant::setMaster [ show | php.net ]

TokyoTyrant::setMaster

(PECL tokyo_tyrant >= 0.1.0)

TokyoTyrant::setMasterSet the replication master

Description

public mixed TokyoTyrant::setMaster ( string $host , int $port , int $timestamp [, bool $check_consistency = TRUE ] )

Sets the replication master of the database

Warning

This method is not supported on 32bit platforms.

Parameters

host

Hostname of the replication master. If NULL the replication is disabled.

port

Port of the replication master

timestamp

Beginning timestamp with microseconds

check_consistency

Whether to check consistency.

Return Values

This method returns the current object and throws TokyoTyrantException on failure.

Examples

Example #1 TokyoTyrant::setMaster() example

<?php
/* Connect to a database */
$tt = new TokyoTyrant("tokyotyrant.example.com");

/* Disable the replication */
$tt->setMaster(NULL00);
?>

See Also

  • Classname::Method()