config

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Timeout    int
	MaxRetries int
	Headers    map[string]string
}

Config represents the application configuration

func NewConfig

func NewConfig() *Config

NewConfig creates a new configuration with default values Returns: - *Config: A new configuration instance with default values

func (*Config) AddHeader

func (c *Config) AddHeader(key, value string)

AddHeader adds a header to the configuration Parameters: - key: string - Header key - value: string - Header value

func (*Config) SetMaxRetries

func (c *Config) SetMaxRetries(retries int)

SetMaxRetries sets the maximum number of retries Parameters: - retries: int - Maximum number of retries

func (*Config) SetTimeout

func (c *Config) SetTimeout(timeout int)

SetTimeout sets the request timeout Parameters: - timeout: int - Timeout in seconds

Jump to

Keyboard shortcuts

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