Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Breaking Change] Change LocoConfig interface #16

Closed
sys1yagi opened this issue May 20, 2019 · 0 comments

Comments

@sys1yagi
Copy link
Owner

commented May 20, 2019

Change parameter of senders

Remove Mapper, and change parameter type of senders.

new LocoConfig style

Loco.start(
  LocoConfig(
    store = // ...,
    smasher = // ...,
    senders = mapOf( 
      StdOutSender() to listOf(
        ClickLog::class
      )
    ),
    scheduler = // ...
  )
)

Introduce ExtraConfig

ExtraConfig is a collection of non-required configs.

class LocoConfig(
    val store: Store,
    val smasher: Smasher,
    val senders: Map<Sender, List<KClass<out LocoLog>>>,
    val scheduler: SendingScheduler,
    val extraConfig: ExtraConfig = ExtraConfig()
) {
    data class ExtraConfig(
        val defaultSender: Sender? = null,
        val sendingBulkSize: Int = 10,
        val internist: Internist? = null
    )
}

@sys1yagi sys1yagi added this to the 1.1.0 milestone May 20, 2019

This was referenced May 20, 2019

@sys1yagi sys1yagi closed this May 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.