Cut over public engine construction to ConfigKit sources
This commit is contained in:
@@ -12,8 +12,10 @@ import (
|
||||
)
|
||||
|
||||
// DirectoryInputs selects the YAML files beneath an explicitly chosen host
|
||||
// directory as one strict-composition tier. The returned order is deterministic;
|
||||
// it does not assign precedence among those files.
|
||||
// directory as one strict-composition group. The returned order is deterministic;
|
||||
// it does not assign precedence among those files. Discovery is recursive over
|
||||
// .yaml and .yml files. An unavailable root fails; an empty directory yields
|
||||
// no inputs. Imports are disabled unless callers enable them on the inputs.
|
||||
func DirectoryInputs(directory string) ([]configkit.Input, error) {
|
||||
root, err := filepath.Abs(directory)
|
||||
if err != nil {
|
||||
@@ -45,8 +47,11 @@ func DirectoryInputs(directory string) ([]configkit.Input, error) {
|
||||
}
|
||||
|
||||
// FilesystemInputs selects the YAML files beneath root in a caller-owned
|
||||
// filesystem as one strict-composition tier. The caller retains ownership of
|
||||
// the filesystem; imports remain disabled unless callers enable them on inputs.
|
||||
// filesystem as one strict-composition group. Discovery is recursive over
|
||||
// .yaml and .yml files, with deterministic ordering and no precedence among
|
||||
// files. The caller retains ownership of the filesystem; an unavailable root
|
||||
// fails and an empty directory yields no inputs. Imports remain disabled unless
|
||||
// callers enable them on inputs.
|
||||
func FilesystemInputs(label string, filesystem fs.FS, root string) ([]configkit.Input, error) {
|
||||
if filesystem == nil {
|
||||
return nil, fmt.Errorf("configuration filesystem is nil")
|
||||
|
||||
Reference in New Issue
Block a user