package gs.config.v0.source import cats.effect.Sync import gs.config.v0.ConfigKey /** Environment variable implementation of [[ConfigSource]]. Pulls all values * from the system environment that was passed to this process. */ final class EnvironmentConfigSource[F[_]: Sync] extends ConfigSource[F]: /** @inheritDocs */ override def getValue( key: ConfigKey[?] ): F[Option[String]] = Sync[F].delay(sys.env.get(key.name.toEnvironmentVariable())) /** @inheritDocs */ override val name: String = "environment"