PHP Class SlightPHP\Rest_Http

Show file Open project: hetao29/slightphp

Public Methods

Method Description
addServer ( $host, $path = "", $weight = 1, $timeout = 1 ) consistent hashing
addServers ( array $servers )
getServer ( $key )
init ( $params = [] )

Private Methods

Method Description
_sort ( $a, $b )
hash ( $str )

Method Details

addServer() public static method

consistent hashing
public static addServer ( $host, $path = "", $weight = 1, $timeout = 1 )

addServers() static public method

static public addServers ( array $servers )
$servers array

getServer() public static method

public static getServer ( $key )

init() public method

public init ( $params = [] )