instance

fun <SRV : Any> instance(instance: SRV): KontainerBuilder

Register an already existing instance as a service

The service can by injected by the type SRV and its base types

fun <SRV : Any, IMPL : SRV> instance(srv: KClass<SRV>, instance: IMPL): KontainerBuilder

Register an already existing instance as a service

The service can by injected by the type SRV and its base types The actual implementation will have the type IMPL