Documentation
¶
Index ¶
Constants ¶
const ( // DialTimeoutDefault is a default dial timeout of FS chain client connection. DialTimeoutDefault = time.Minute // 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 ¶
CacheTTL returns the value of "cache_ttl" config parameter from "fschain" section (primary) or 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 "fschain" section (primary) or from "morph" section.
Returns DialTimeoutDefault if the value is not positive duration.
func Endpoints ¶
Endpoints returns list of the values of "endpoints" config parameter from "fschain" section (primary) or from "morph" section.
Throws panic if list is empty.
func ReconnectionRetriesDelay ¶
ReconnectionRetriesDelay returns the value of "reconnections_delay" config parameter from "fschain" section (primary) or from "morph" section.
Returns 0 if value is not specified.
func ReconnectionRetriesNumber ¶
ReconnectionRetriesNumber returns the value of "reconnections_number" config parameter from "fschain" section (primary) or from "morph" section.
Returns 0 if value is not specified.
Types ¶
This section is empty.