Skip to content

Instantly share code, notes, and snippets.

@s1monw1
Created August 24, 2017 11:26
Show Gist options
  • Save s1monw1/7245d4745c60951f2b2ba06a433bf358 to your computer and use it in GitHub Desktop.
Save s1monw1/7245d4745c60951f2b2ba06a433bf358 to your computer and use it in GitHub Desktop.
class ProviderConfiguration {
var kmConfig: Store? = null
var tmConfig: Store? = null
var socketConfig: SocketConfiguration? = null
fun open(name: String) = Store(name)
fun sockets(configInit: SocketConfiguration.() -> Unit) {
this.socketConfig = SocketConfiguration().apply(configInit)
}
fun keyManager(store: () -> Store) {
this.kmConfig = store()
}
fun trustManager(store: () -> Store) {
this.tmConfig = store()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment