Skip to main content

from_env

Function from_env 

Source
pub fn from_env() -> Result<Endpoint, WorkloadApiError>
Expand description

Load and parse the Workload API endpoint from SPIFFE_ENDPOINT_SOCKET.

ยงErrors

Returns a WorkloadApiError if:

  • the SPIFFE_ENDPOINT_SOCKET environment variable is not set, or
  • the value of SPIFFE_ENDPOINT_SOCKET is not a valid SPIFFE endpoint URI.