-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add advanced scheduling option to the test configuration (#101)
Problem: Advanced scheduling option added to the Datadog UI was missing in the library. Solution: Add advanced scheduling option to the test configuration in the library
- Loading branch information
Showing
5 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/kotlin/com/personio/synthetics/model/config/Timeframe.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.personio.synthetics.model.config | ||
|
||
import java.time.DayOfWeek | ||
import java.time.LocalTime | ||
|
||
class Timeframe private constructor( | ||
val from: LocalTime, | ||
val to: LocalTime, | ||
val days: Set<DayOfWeek> | ||
) { | ||
companion object { | ||
operator fun invoke( | ||
from: LocalTime, | ||
to: LocalTime, | ||
day: DayOfWeek, | ||
vararg moreDays: DayOfWeek | ||
) = Timeframe(from, to, setOf(day) + moreDays.toSet()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters