com.personio.synthetics.builder.api.StepsBuilder.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of datadog-synthetic-test-support Show documentation
Show all versions of datadog-synthetic-test-support Show documentation
Kotlin library for managing Datadog Synthetic test as code
package com.personio.synthetics.builder.api
import com.datadog.api.client.v1.model.SyntheticsAPIStep
class StepsBuilder {
private val steps = mutableListOf()
fun build(): List {
return steps
}
/**
* Appends a SyntheticsAPIStep
* @param name Step name
* @param stepBuilder Optional step builder
* @param init Configuration to be applied on the step builder
*/
fun step(
name: String,
stepBuilder: StepBuilder = StepBuilder(name),
init: StepBuilder.() -> Unit,
) {
steps += stepBuilder.apply(init).build()
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy