busser / murmur

Pass secrets as environment variables to a process
Apache License 2.0
120 stars 7 forks source link

Expose ResolveAll in an external module #481

Open christianking-gitlab opened 5 months ago

christianking-gitlab commented 5 months ago

There are some situations where it's preferable to have Murmur usable as a library, rather than as a separate executable.

In Issue 471 the use case is for testing, but I have an additional use case where I need to resolve secrets from a configuration file rather than environment variables.

Currently, that's not possible since Murmur doesn't expose any external interface at all. This PR adds a minimal external interface which wraps the internal function ResolveAll for external use. As a wrapper, this still allows the freedom to change or remove the internal ResolveAll function if required, it would just require additional changes in the wrapper to preserve the existing call signature.