providers

package
v0.0.0-...-b7da0db Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider interface {
	// Get retrieves configuration data from the source
	Get(ctx context.Context, path string) ([]byte, error)

	// Watch starts monitoring the given path for changes
	// Returns a channel that will receive notifications when changes occur
	Watch(ctx context.Context, path string) (<-chan struct{}, error)

	// Name returns the provider's name (e.g., "git", "consul")
	Name() string

	// Close releases any resources held by the provider
	Close() error
}

Provider defines the interface for all configuration providers

type ProviderFactory

type ProviderFactory func(source Source) (Provider, error)

ProviderFactory creates a new provider instance

type Source

type Source struct {
	Type     string            // Type of the source (git, consul, etc.)
	Location string            // Location of the source (URL, path, etc.)
	Auth     map[string]string // Authentication information
	Options  map[string]string // Additional options
}

Source represents a configuration source URI

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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