cloudstateio / kotlin-support

Cloudstate Kotlin Support
https://cloudstate.io/docs/user/lang/kotlin/index.html
Apache License 2.0
8 stars 5 forks source link

Changes in register entities API's #7

Closed sleipnir closed 4 years ago

sleipnir commented 4 years ago

This PR changes the way entities are registered. Examples:

Before

fun main() {
    cloudstate {
        host = "0.0.0.0"
        port = 8080
        loglevel = "INFO"

        registerEventsourcedEntity {
            entityService = ShoppingCartEntity::class.java
            ....
        }
    }.start()
            .toCompletableFuture()
            .get()
}

After

fun main() {
    cloudstate {
        config {
            host = "0.0.0.0"
            port = 8080
            loglevel = "INFO"
        }

        eventsourced {
            entityService = ShoppingCartEntity::class
            ....
        }
    }.start()
            .toCompletableFuture()
            .get()
}
sleipnir commented 4 years ago

Ideally, this PR should be evaluated after this other one: https://github.com/cloudstateio/kotlin-support/pull/4

sleipnir commented 4 years ago

I'm closing this one because the next PR resolves an existing conflict with the master branch