Documentation ¶
Index ¶
- func ExportConfig(services []models.ServiceConfiguration, path string, maskSecrets bool) error
- func GetLabelKey(suffix string) string
- func ImportConfig(path string) ([]models.ServiceConfiguration, error)
- func ValidateService(service models.ServiceConfiguration) error
- type ConfigFile
- type DockerDiscovery
- type KubernetesDiscovery
- type Manager
- type ServiceConfig
- type ServiceDiscoverer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportConfig ¶
func ExportConfig(services []models.ServiceConfiguration, path string, maskSecrets bool) error
ExportConfig exports service configurations to a file
func GetLabelKey ¶
GetLabelKey returns the full label key for a given suffix
func ImportConfig ¶
func ImportConfig(path string) ([]models.ServiceConfiguration, error)
ImportConfig imports service configurations from a file
func ValidateService ¶
func ValidateService(service models.ServiceConfiguration) error
ValidateService checks if a discovered service configuration is valid
Types ¶
type ConfigFile ¶
type ConfigFile struct {
Services map[string][]ServiceConfig `json:"services" yaml:"services"`
}
ConfigFile represents the structure of the external configuration file
type DockerDiscovery ¶
type DockerDiscovery struct {
// contains filtered or unexported fields
}
DockerDiscovery handles service discovery from Docker labels
func NewDockerDiscovery ¶
func NewDockerDiscovery() (*DockerDiscovery, error)
NewDockerDiscovery creates a new Docker discovery instance
func (*DockerDiscovery) Close ¶
func (d *DockerDiscovery) Close() error
Close closes the Docker client connection
func (*DockerDiscovery) DiscoverServices ¶
func (d *DockerDiscovery) DiscoverServices(ctx context.Context) ([]models.ServiceConfiguration, error)
DiscoverServices finds services configured via Docker labels
type KubernetesDiscovery ¶
type KubernetesDiscovery struct {
// contains filtered or unexported fields
}
KubernetesDiscovery handles service discovery from Kubernetes labels
func NewKubernetesDiscovery ¶
func NewKubernetesDiscovery() (*KubernetesDiscovery, error)
NewKubernetesDiscovery creates a new Kubernetes discovery instance
func (*KubernetesDiscovery) Close ¶
func (k *KubernetesDiscovery) Close() error
Close is a no-op for Kubernetes client
func (*KubernetesDiscovery) DiscoverServices ¶
func (k *KubernetesDiscovery) DiscoverServices(ctx context.Context) ([]models.ServiceConfiguration, error)
DiscoverServices finds services configured via Kubernetes labels
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles multiple service discovery methods
func (*Manager) DiscoverAll ¶
DiscoverAll finds services using all available discovery methods
type ServiceConfig ¶
type ServiceConfig struct { URL string `json:"url" yaml:"url"` APIKey string `json:"apikey" yaml:"apikey"` DisplayName string `json:"name,omitempty" yaml:"name,omitempty"` Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` }
ServiceConfig represents a service configuration in the external file
type ServiceDiscoverer ¶
type ServiceDiscoverer interface { // DiscoverServices finds and returns service configurations DiscoverServices(ctx context.Context) ([]models.ServiceConfiguration, error) // Close cleans up any resources used by the discoverer Close() error }
ServiceDiscoverer defines the interface for service discovery implementations