Skip to content

Sources

Javier Diaz edited this page Aug 4, 2018 · 3 revisions

A source is just a really simple interface which will be the one that will get the file from wherever needs to be fetched. The interface will just have a method that returns an InputStream which will hold the stream of bytes of the configuration.

interface ConfigSource {
    fun read(): InputStream
}

There are plenty of configuration sources already built in. Here's a list (in core):

  1. URLConfigSource
  2. StringConfigSource
  3. StringRotationConfigSource
  4. FunctionConfigSource
  5. StringFunctionConfigSource
  6. FileConfigSource
  7. ClasspathConfigSource
Clone this wiki locally