apiclientconfig

package
v0.42.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// DialTimeoutDefault is a default dial timeout of NeoFS API client connection.
	DialTimeoutDefault = 5 * time.Second

	// StreamTimeoutDefault is a default timeout of NeoFS API streaming operation.
	StreamTimeoutDefault = 15 * time.Second
)

Variables

This section is empty.

Functions

func AllowExternal added in v0.33.0

func AllowExternal(c *config.Config) bool

AllowExternal returns the value of "allow_external" config parameter from "apiclient" section.

Returns false if the value is missing or invalid.

func DialTimeout

func DialTimeout(c *config.Config) time.Duration

DialTimeout returns the value of "dial_timeout" config parameter from "apiclient" section.

Returns DialTimeoutDefault if the value is not positive duration.

func ReconnectTimeout added in v0.36.0

func ReconnectTimeout(c *config.Config) time.Duration

ReconnectTimeout returns the value of "reconnect_timeout" config parameter from "apiclient" section.

Returns 0 if the value is not positive duration.

func StreamTimeout added in v0.32.0

func StreamTimeout(c *config.Config) time.Duration

StreamTimeout returns the value of "stream_timeout" config parameter from "apiclient" section.

Returns DialTimeoutDefault if the value is not positive duration.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL