PHP Class ec2dns\ec2dns

Author: Dominik Tobschall (http://fruux.com/)
Show file Open project: fruux/ec2dns

Protected Properties

Property Type Description
$dnsCache
$ec2
$listener
$tld
$ttl

Public Methods

Method Description
__construct ( ec2 $ec2 ) Creates the class.
onQueryCallback ( Hoa\Event\Bucket $bucket ) : false | string onQuery callback
run ( ) : void This method starts the ec2dns eventloop

Protected Methods

Method Description
getCache ( string $type, string $tag ) : false | string dnsCache Getter
resolve ( string $type, string $tag ) : false | string This method resolves tags to IPs via ec2host.
setCache ( string $type, string $tag, string $ip ) : void dnsCache Setter
stripTld ( string $domain ) : string Returns the tag.

Method Details

__construct() public method

Creates the class.
public __construct ( ec2 $ec2 )
$ec2 ec2

getCache() protected method

dnsCache Getter
protected getCache ( string $type, string $tag ) : false | string
$type string
$tag string
return false | string

onQueryCallback() public method

onQuery callback
public onQueryCallback ( Hoa\Event\Bucket $bucket ) : false | string
$bucket Hoa\Event\Bucket
return false | string

resolve() protected method

This method resolves tags to IPs via ec2host.
protected resolve ( string $type, string $tag ) : false | string
$type string
$tag string
return false | string

run() public method

This method starts the ec2dns eventloop
public run ( ) : void
return void

setCache() protected method

dnsCache Setter
protected setCache ( string $type, string $tag, string $ip ) : void
$type string
$tag string
$ip string
return void

stripTld() protected method

Returns the tag.
protected stripTld ( string $domain ) : string
$domain string
return string

Property Details

$dnsCache protected property

protected $dnsCache

$ec2 protected property

protected $ec2

$listener protected property

protected $listener

$tld protected property

protected $tld

$ttl protected property

protected $ttl