http

package
v0.14.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigCenter = &Http{}

Functions

This section is empty.

Types

type Http

type Http struct {
	ReloadInterval time.Duration
	Urls           []string
	AuthBasic      string
	Headers        map[string]string
	// contains filtered or unexported fields
}

func (*Http) Handle added in v0.5.3

func (cc *Http) Handle(ctx context.Context, merge func(io.Reader) error, onChange func(io.Reader) error) error

Handle fetches each URL and calls merge; if ReloadInterval > 0, starts a background watcher that calls onChange whenever any URL content changes.

func (*Http) Type

func (cc *Http) Type() string

Type returns the identifier string "http" for this config center.

Jump to

Keyboard shortcuts

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