EnvironmentVariablesModule
PackageAxial.PlatformService
Helpers for the environment-variable service.
Summary
| Name | Signature | Synopsis |
|---|---|---|
| service | EnvironmentVariables.service | Reads the service from the environment. |
| tryGet | EnvironmentVariables.tryGet name | Reads a raw environment-variable value from an explicit environment-variable service. |
| getAll | EnvironmentVariables.getAll | Returns all visible environment variables from an explicit environment-variable service. |
| set | EnvironmentVariables.set name value | Sets or updates an environment variable through an explicit environment-variable service. |
| clear | EnvironmentVariables.clear name | Clears an environment variable through an explicit environment-variable service. |
| expand | EnvironmentVariables.expand text | Expands environment-variable references in text through an explicit environment-variable service. |
| live | EnvironmentVariables.live | Creates a live provider backed by the current process environment. |
| fromPairs | EnvironmentVariables.fromPairs values | Creates a deterministic provider from a fixed set of name/value pairs. |
| layer | EnvironmentVariables.layer | Builds the live environment-variable service as a layer. |
Reads the service from the environment.
Returns
Flow<'env, 'error, IEnvironmentVariables>
Reads a raw environment-variable value from an explicit environment-variable service.
Parameters
| Name | Type | Description |
|---|---|---|
| name | string |
Returns
Flow<'env, 'error, string option>
Returns all visible environment variables from an explicit environment-variable service.
Returns
Flow<'env, 'error, IReadOnlyDictionary<string, string>>
Sets or updates an environment variable through an explicit environment-variable service.
Parameters
| Name | Type | Description |
|---|---|---|
| name | string | |
| value | string |
Returns
Flow<'env, 'error, unit>
Clears an environment variable through an explicit environment-variable service.
Parameters
| Name | Type | Description |
|---|---|---|
| name | string |
Returns
Flow<'env, 'error, unit>
Expands environment-variable references in text through an explicit environment-variable service.
Parameters
| Name | Type | Description |
|---|---|---|
| text | string |
Returns
Flow<'env, 'error, string>
Creates a live provider backed by the current process environment.
Returns
IEnvironmentVariables
Creates a deterministic provider from a fixed set of name/value pairs.
Parameters
| Name | Type | Description |
|---|---|---|
| values | (string * string) seq |
Returns
IEnvironmentVariables

