Documentation ¶
Index ¶
- Constants
- func BaseTimePerCU(cu uint64) time.Duration
- func ContextOutOfTime(ctx context.Context) bool
- func FindSequenceNumber(sequence string) (int, error)
- func GetRemainingTimeoutFromContext(ctx context.Context) (timeRemaining time.Duration)
- func GetTimePerCu(cu uint64) time.Duration
- func IsTestMode(ctx context.Context) bool
- func LocalNodeTimePerCu(cu uint64) time.Duration
- func LowerContextTimeout(ctx context.Context, timeout time.Duration) (context.Context, context.CancelFunc)
- func ParseEndpointArgs(endpoint_strings []string, yaml_config_properties []string, ...) (viper_endpoints *viper.Viper, err error)
- func ParseTransactionResult(transactionResult string) (string, int)
- func ValidateEndpoint(endpoint string, apiInterface string) error
- type AuthConfig
- type NodeUrl
- func (url *NodeUrl) LowerContextTimeout(ctx context.Context, timeout time.Duration) (context.Context, context.CancelFunc)
- func (url *NodeUrl) SetAuthHeaders(ctx context.Context, headerSetter func(string, string))
- func (url *NodeUrl) SetIpForwardingIfNecessary(ctx context.Context, headerSetter func(string, string))
- func (url *NodeUrl) String() string
- type Test_mode_ctx_key
Constants ¶
View Source
const ( EndpointsConfigName = "endpoints" SaveConfigFlagName = "save-conf" GeolocationFlag = "geolocation" TestModeFlagName = "test-mode" MaximumConcurrentProvidersFlagName = "concurrent-providers" )
View Source
const ( URL_QUERY_PARAMETERS_SEPARATOR_FROM_PATH = "?" URL_QUERY_PARAMETERS_SEPARATOR_OTHER_PARAMETERS = "&" IP_FORWARDING_HEADER_NAME = "X-Forwarded-For" )
View Source
const ( TimePerCU = uint64(100 * time.Millisecond) MinimumTimePerRelayDelay = time.Second DataReliabilityTimeoutIncrease = 5 * time.Second AverageWorldLatency = 300 * time.Millisecond )
Variables ¶
This section is empty.
Functions ¶
func BaseTimePerCU ¶
func ContextOutOfTime ¶
func FindSequenceNumber ¶
extract requested sequence number from tx error.
func GetTimePerCu ¶
func IsTestMode ¶
func LocalNodeTimePerCu ¶
func LowerContextTimeout ¶ added in v0.9.3
func ParseEndpointArgs ¶
func ParseTransactionResult ¶
func ValidateEndpoint ¶
Types ¶
type AuthConfig ¶
type AuthConfig struct { AuthHeaders map[string]string `yaml:"auth-headers,omitempty" json:"auth-headers,omitempty" mapstructure:"auth-headers"` AuthQuery string `yaml:"auth-query,omitempty" json:"auth-query,omitempty" mapstructure:"auth-query"` UseTLS bool `yaml:"use-tls,omitempty" json:"use-tls,omitempty" mapstructure:"use-tls"` KeyPem string `yaml:"key-pem,omitempty" json:"key-pem,omitempty" mapstructure:"key-pem"` CertPem string `yaml:"cert-pem,omitempty" json:"cert-pem,omitempty" mapstructure:"cert-pem"` CaCert string `yaml:"cacert-pem,omitempty" json:"cacert-pem,omitempty" mapstructure:"cacert-pem"` }
func (*AuthConfig) AddAuthPath ¶
func (ac *AuthConfig) AddAuthPath(url string) string
func (*AuthConfig) GetCaCertificateParams ¶
func (ac *AuthConfig) GetCaCertificateParams() string
File containing trusted root certificates for verifying the server.
func (*AuthConfig) GetLoadingCertificateParams ¶
func (ac *AuthConfig) GetLoadingCertificateParams() (string, string)
File containing client certificate (public key), to present to the server. + File containing client private key, to present to the server.
func (*AuthConfig) GetUseTls ¶
func (ac *AuthConfig) GetUseTls() bool
type NodeUrl ¶
type NodeUrl struct { Url string `yaml:"url,omitempty" json:"url,omitempty" mapstructure:"url"` AuthConfig AuthConfig `yaml:"auth-config,omitempty" json:"auth-config,omitempty" mapstructure:"auth-config"` IpForwarding bool `yaml:"ip-forwarding,omitempty" json:"ip-forwarding,omitempty" mapstructure:"ip-forwarding"` Timeout time.Duration `yaml:"timeout,omitempty" json:"timeout,omitempty" mapstructure:"timeout"` }
func (*NodeUrl) LowerContextTimeout ¶
func (*NodeUrl) SetAuthHeaders ¶
func (*NodeUrl) SetIpForwardingIfNecessary ¶
type Test_mode_ctx_key ¶
type Test_mode_ctx_key struct{}
Click to show internal directories.
Click to hide internal directories.