Rollout

zio.blocks.config.Rollout
object Rollout

Rollout DSL for selecting values based on path-matching and percentage bucketing.

Grammar:

 expression = choice { ";" choice }
 choice     = value "@" selector | value
 selector   = path [ "/" percentage ]
 path       = segment { "/" segment }
 segment    = "*" | literal
 percentage = digits "%"

Left-to-right evaluation, first match wins. A bare value (no @) is a catch-all and should appear last; later entries are unreachable.

Attributes

Source
Rollout.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Rollout.type

Members list

Type members

Classlikes

object Choice

Attributes

Companion
trait
Source
Rollout.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Choice.type
sealed trait Choice

Attributes

Companion
object
Source
Rollout.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class CatchAll
class Targeted
final case class Choices(entries: List[Choice])

Attributes

Source
Rollout.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Segment

Attributes

Companion
trait
Source
Rollout.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Segment.type
sealed trait Segment

Attributes

Companion
object
Source
Rollout.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Literal
object Wildcard
final case class Selector(segments: List[Segment], percentage: Maybe[Int])

Attributes

Source
Rollout.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def bucketFor(key: String): Int

Attributes

Source
Rollout.scala
def evaluateIndex(choices: Choices, path: String, bucket: Int): Maybe[String]

Attributes

Source
Rollout.scala
def parseChoices(expression: String): Either[ConfigError, Choices]

Attributes

Source
Rollout.scala
def select(expression: String, path: String, bucket: Int): Maybe[String]

Attributes

Source
Rollout.scala
def validate(expression: String): Either[ConfigError, List[String]]

Attributes

Source
Rollout.scala