app

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderTimeout       = 5 * time.Second
	DefaultMaxConcurrency = 8
	DefaultRetryCount     = 1
	DefaultCacheTTL       = 60 * time.Second
	DefaultErrorCacheTTL  = 10 * time.Second
)

Variables

This section is empty.

Functions

func CheckProviders

func CheckProviders(ctx context.Context, registry *providers.Registry, providerIDs []string, opts StatusOptions) (status.Response, error)

CheckProviders fetches all requested providers concurrently and returns results in the same order as the requested IDs.

func StreamProviders added in v1.0.1

func StreamProviders(ctx context.Context, registry *providers.Registry, providerIDs []string, opts StatusOptions) (<-chan ProviderStatusResult, error)

StreamProviders fetches requested providers concurrently and emits each provider snapshot as soon as it is available. A final Done result is emitted after cache persistence and aggregate error handling are complete.

Types

type ProviderStatusResult added in v1.0.1

type ProviderStatusResult struct {
	Index        int
	Snapshot     status.Snapshot
	RuntimeError bool
	Done         bool
	Err          error
}

ProviderStatusResult is a single streamed provider status update.

type StatusOptions

type StatusOptions struct {
	Details       bool
	Cache         *statuscache.Cache
	CacheTTL      time.Duration
	ErrorCacheTTL time.Duration
	ForceRefresh  bool
	Logger        *slog.Logger
	MaxConcurrent int
	RetryCount    int
}

StatusOptions controls status fetch behavior.

Jump to

Keyboard shortcuts

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