Documentation ¶
Index ¶
Constants ¶
const ( // DialTimeoutDefault is a default dial timeout of morph chain client connection. DialTimeoutDefault = 5 * time.Second // CacheTTLDefault is a default value for cached values TTL. // It is 0, because actual default depends on block time. CacheTTLDefault = time.Duration(0) // ReconnectionRetriesNumberDefault is a default value for reconnection retries. ReconnectionRetriesNumberDefault = 5 // ReconnectionRetriesDelayDefault is a default delay b/w reconnections. ReconnectionRetriesDelayDefault = 5 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func CacheTTL ¶ added in v0.32.0
CacheTTL returns the value of "cache_ttl" config parameter from "morph" section.
Returns CacheTTLDefault if value is zero or invalid. Supports negative durations.
func DialTimeout ¶
DialTimeout returns the value of "dial_timeout" config parameter from "morph" section.
Returns DialTimeoutDefault if the value is not positive duration.
func Endpoints ¶ added in v0.37.0
Endpoints returns list of the values of "endpoints" config parameter from "morph" section.
Throws panic if list is empty.
func ReconnectionRetriesDelay ¶ added in v0.37.0
ReconnectionRetriesDelay returns the value of "reconnections_delay" config parameter from "morph" section.
Returns 0 if value is not specified.
func ReconnectionRetriesNumber ¶ added in v0.37.0
ReconnectionRetriesNumber returns the value of "reconnections_number" config parameter from "morph" section.
Returns 0 if value is not specified.
Types ¶
This section is empty.