config

package
v0.0.0-...-05a3ed2 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultAddr          = Addr{/* contains filtered or unexported fields */}
	DefaultProto         = TCP
	DefaultTimeout       = 5 * time.Second
	DefaultHeaderTimeout = 1 * time.Second
)
View Source
var ErrProtocol = errors.New("unknown protocol")

Functions

This section is empty.

Types

type Addr

type Addr struct {
	// contains filtered or unexported fields
}

func (*Addr) Set

func (a *Addr) Set(set string) error

func (*Addr) String

func (a *Addr) String() string

type Flags

type Flags struct {
	*flag.FlagSet
	Bind          Addr
	Proto         Proto
	Timeout       time.Duration
	HeaderTimeout time.Duration
	Verbose       uint
}

func New

func New(out io.Writer, name, version string) *Flags

type Proto

type Proto uint
const (
	TCP Proto = iota
	HTTP
)

func (*Proto) Set

func (p *Proto) Set(set string) error

func (*Proto) String

func (p *Proto) String() string

Jump to

Keyboard shortcuts

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