EnvironmentVariablesModule

PackageAxial.PlatformService
Helpers for the environment-variable service.

Summary

NameSignatureSynopsis
serviceEnvironmentVariables.service Reads the service from the environment.
tryGetEnvironmentVariables.tryGet nameReads a raw environment-variable value from an explicit environment-variable service.
getAllEnvironmentVariables.getAll Returns all visible environment variables from an explicit environment-variable service.
setEnvironmentVariables.set name valueSets or updates an environment variable through an explicit environment-variable service.
clearEnvironmentVariables.clear nameClears an environment variable through an explicit environment-variable service.
expandEnvironmentVariables.expand textExpands environment-variable references in text through an explicit environment-variable service.
liveEnvironmentVariables.live Creates a live provider backed by the current process environment.
fromPairsEnvironmentVariables.fromPairs valuesCreates a deterministic provider from a fixed set of name/value pairs.
layerEnvironmentVariables.layer Builds the live environment-variable service as a layer.

service

EnvironmentVariables.service
Member
Reads the service from the environment.

Returns

Flow<'env, 'error, IEnvironmentVariables>

tryGet

EnvironmentVariables.tryGet name
Member
Reads a raw environment-variable value from an explicit environment-variable service.

Parameters

NameTypeDescription
namestring

Returns

Flow<'env, 'error, string option>

getAll

EnvironmentVariables.getAll
Member
Returns all visible environment variables from an explicit environment-variable service.

Returns

Flow<'env, 'error, IReadOnlyDictionary<string, string>>

set

EnvironmentVariables.set name value
Member
Sets or updates an environment variable through an explicit environment-variable service.

Parameters

NameTypeDescription
namestring
valuestring

Returns

Flow<'env, 'error, unit>

clear

EnvironmentVariables.clear name
Member
Clears an environment variable through an explicit environment-variable service.

Parameters

NameTypeDescription
namestring

Returns

Flow<'env, 'error, unit>

expand

EnvironmentVariables.expand text
Member
Expands environment-variable references in text through an explicit environment-variable service.

Parameters

NameTypeDescription
textstring

Returns

Flow<'env, 'error, string>

live

EnvironmentVariables.live
Member
Creates a live provider backed by the current process environment.

Returns

IEnvironmentVariables

fromPairs

EnvironmentVariables.fromPairs values
Member
Creates a deterministic provider from a fixed set of name/value pairs.

Parameters

NameTypeDescription
values(string * string) seq

Returns

IEnvironmentVariables

layer

EnvironmentVariables.layer
Member
Builds the live environment-variable service as a layer.

Returns

Layer<unit, Never, IEnvironmentVariables>