Packages

p

knobs

package knobs

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. knobs
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type ChangeHandler[F[_]] = (Name, Option[CfgValue]) ⇒ F[Unit]
  2. type Env = Map[Name, CfgValue]
  3. type KnobsResource = Worth[ResourceBox]
  4. type Name = String
  5. type Path = String

Value Members

  1. def load[F[_]](files: List[KnobsResource], pool: ExecutionContext)(implicit arg0: Effect[F]): F[MutableConfig[F]]
  2. def loadGroups[F[_]](files: List[(Name, KnobsResource)], pool: ExecutionContext)(implicit arg0: Effect[F]): F[MutableConfig[F]]
  3. def loadImmutable[F[_]](files: List[KnobsResource], pool: ExecutionContext)(implicit arg0: Effect[F]): F[Config]
  4. def recursiveImports[F[_], R](path: R, d: List[Directive])(implicit arg0: Sync[F], arg1: Resource[R]): F[List[R]]
  5. object Typesafe

    Adapts a Typesafe Config to a Knobs Config.

    Adapts a Typesafe Config to a Knobs Config.

    Caution: Typesafe Config's grammar does not distinguish a duration type from other String values. This means that durations are not extracted in knobs in the same way as using the native Typesafe Config API:

    scala> val ts = ConfigFactory.parseString(""" "dur" = 3 seconds """)
    ts: com.typesafe.config.Config = Config(SimpleConfigObject({"dur":"3 seconds"}))
    
    scala> ts.getDuration("dur", java.util.concurrent.TimeUnit.MILLISECONDS)
    res0: Long = 3000
    
    scala> val k = knobs.Typesafe.config[IO](ts).unsafePerformSync
    k: knobs.Config = Config(Map(dur -> CfgText(3 seconds)))
    
    scala> k.lookup[Duration]("dur")
    res1: Option[scala.concurrent.duration.Duration] = None
    
    scala> k.lookup[String]("dur")
    res2: Option[String] = Some(3 seconds)

Deprecated Value Members

  1. def importsOf[R](path: R, d: List[Directive])(implicit arg0: Resource[R]): List[KnobsResource]
    Annotations
    @deprecated
    Deprecated

    (Since version 4.0.31) Does not support interpolation of environment variables

  2. def resolveImports[R](path: R, d: List[Directive])(implicit arg0: Resource[R]): List[R]
    Annotations
    @deprecated
    Deprecated

    (Since version 4.0.31) Does not support interpolation of environment variables

Inherited from AnyRef

Inherited from Any

Ungrouped