types

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func Cost

func Cost() func() time.Duration

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 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