config

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 5 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 {
	Requests int `json:"requests" yaml:"requests"`

	Clients int `json:"clients" yaml:"clients"`

	Endpoints int `json:"endpoints" yaml:"endpoints"`

	Upstreams int `json:"upstreams" yaml:"upstreams"`

	Size int `json:"size" yaml:"size"`

	Connect ConnectConfig `json:"server" yaml:"server"`

	Log log.Config `json:"log" yaml:"log"`
}

func Default

func Default() *Config

func (*Config) RegisterFlags

func (c *Config) RegisterFlags(fs *pflag.FlagSet)

func (*Config) Validate

func (c *Config) Validate() error

type ConnectConfig

type ConnectConfig struct {
	// ProxyURL is the server proxy URL.
	ProxyURL string `json:"proxy_url" yaml:"proxy_url"`

	// UpstreamURL is the server upstream URL.
	UpstreamURL string `json:"upstream_url" yaml:"upstream_url"`

	// Timeout is the timeout attempting to connect to the Piko server on
	// boot.
	Timeout time.Duration `json:"timeout" yaml:"timeout"`
}

func (*ConnectConfig) RegisterFlags

func (c *ConnectConfig) RegisterFlags(fs *pflag.FlagSet)

func (*ConnectConfig) Validate

func (c *ConnectConfig) Validate() error

Jump to

Keyboard shortcuts

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