features

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feature

type Feature interface {
	// Type returns the feature type identifier (e.g., "file", "dconf", "systemd", "sed")
	Type() string

	// Executor returns the executor implementation for this feature
	Executor() engine.Executor

	// NewTarget creates a new target instance for this feature type
	NewTarget(name string, config interface{}) (types.AnyTarget, error)

	// ValidateConfig validates the feature-specific target definition
	Validate(config interface{}) error
}

Feature represents a target feature (file, dconf, systemd, sed) Each feature is a self-contained module that handles a specific type of target

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry manages all available features (file, dconf, systemd, sed) It provides a central point for feature discovery and executor retrieval

func NewRegistry

func NewRegistry() *Registry

NewRegistry creates a new feature registry All features must be registered during initialization

func (*Registry) Executor

func (r *Registry) Executor(targetType string) (engine.Executor, error)

Executor retrieves the executor for a specific target type This is a convenience method commonly used by the reconciliation engine

func (*Registry) Features

func (r *Registry) Features() []Feature

Features returns all registered features

func (*Registry) Get

func (r *Registry) Get(targetType string) (Feature, error)

Get retrieves a feature by type

func (*Registry) Has

func (r *Registry) Has(targetType string) bool

Has checks if a feature is registered for the given type

func (*Registry) Register

func (r *Registry) Register(feature Feature)

Register adds a feature to the registry The feature's Type() is used as the key

func (*Registry) Types

func (r *Registry) Types() []string

Types returns all registered target types

Jump to

Keyboard shortcuts

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