2021-05-21 17:36:37 +00:00
|
|
|
package internal
|
|
|
|
|
2021-05-21 17:40:43 +00:00
|
|
|
import (
|
|
|
|
"strings"
|
|
|
|
)
|
|
|
|
|
2021-05-21 17:36:37 +00:00
|
|
|
// EnvPrefix is a prefix of ENV variables related
|
|
|
|
// to storage node configuration.
|
|
|
|
const EnvPrefix = "neofs"
|
|
|
|
|
|
|
|
// EnvSeparator is a section separator in ENV variables.
|
|
|
|
const EnvSeparator = "_"
|
2021-05-21 17:40:43 +00:00
|
|
|
|
2022-04-21 11:28:05 +00:00
|
|
|
// Env returns ENV variable key for a particular config parameter.
|
2021-05-21 17:40:43 +00:00
|
|
|
func Env(path ...string) string {
|
|
|
|
return strings.ToUpper(
|
|
|
|
strings.Join(
|
|
|
|
append([]string{EnvPrefix}, path...),
|
|
|
|
EnvSeparator,
|
|
|
|
),
|
|
|
|
)
|
|
|
|
}
|