types

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const MaskedPassword = "--------"

Variables

This section is empty.

Functions

func Cost

func Cost() func() time.Duration

func IsDuration added in v0.2.5

func IsDuration(str string) bool

func ParseDuration added in v0.2.5

func ParseDuration(s string) (time.Duration, error)

Types

type Component

type Component interface {
	// Key identifies a unique component with
	Key() string
	// Hostname endpoint hostname
	Hostname() string
	// Options with key and values
	Options() url.Values
}

type ComponentLivenessChecker

type ComponentLivenessChecker interface {
	LivenessCheck(ctx context.Context) map[Component]LivenessCheckDetail
}

type Duration added in v0.2.5

type Duration time.Duration

func (Duration) IsZero added in v0.2.5

func (d Duration) IsZero() bool

func (Duration) MarshalText added in v0.2.5

func (d Duration) MarshalText() ([]byte, error)

func (Duration) String added in v0.2.5

func (d Duration) String() string

func (*Duration) UnmarshalText added in v0.2.5

func (d *Duration) UnmarshalText(data []byte) error

type Endpoint

type Endpoint struct {
	Scheme   string
	Host     string
	Port     uint16
	Base     string
	Username string
	Password Password
	Param    url.Values
}

func ParseEndpoint

func ParseEndpoint(text string) (*Endpoint, error)

func (Endpoint) Hostname

func (e Endpoint) Hostname() string

func (Endpoint) IsZero

func (e Endpoint) IsZero() bool

func (*Endpoint) Key

func (e *Endpoint) Key() string

func (Endpoint) MarshalText

func (e Endpoint) MarshalText() ([]byte, error)

func (*Endpoint) Options

func (e *Endpoint) Options() url.Values

func (Endpoint) SecurityString

func (e Endpoint) SecurityString() string

func (Endpoint) String

func (e Endpoint) String() string

func (*Endpoint) UnmarshalText

func (e *Endpoint) UnmarshalText(text []byte) error

type LivenessCheckDetail

type LivenessCheckDetail struct {
	Reachable bool          `json:"reachable"`
	TTL       time.Duration `json:"ttl,omitempty"`
	Msg       string        `json:"msg,omitempty"`
}

type LivenessChecker

type LivenessChecker interface {
	LivenessCheck() map[string]string
}

type Password

type Password string

func (Password) SecurityString

func (p Password) SecurityString() string

func (Password) String

func (p Password) String() string

Jump to

Keyboard shortcuts

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