Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntityBuilder ¶
type EntityBuilder interface { // Name will use the Label.String() method value of the generated value from the label builder. Name(template labels.Template) EntityBuilder // Ordering will set the ordering builder to the given builder. Ordering(builder OrderingBuilder) EntityBuilder // AddRelation will add a relation generated from the given label builder, AddRelation(template labels.Template) EntityBuilder // AddMetric will add the metric generated from the given distribution. AddMetric(metricType metrics.Type, distribution generation.Distribution) EntityBuilder // Requirement will set the requirement builder to the given builder. Requirement(builder RequirementBuilder) EntityBuilder // Generate will generate an entity that depends on the random source and the time. Generate(random generation.Random, time time.Duration) *placement.Entity }
EntityBuilder is used to generate new entities for use in tests and benchmarks.
func NewEntityBuilder ¶
func NewEntityBuilder() EntityBuilder
NewEntityBuilder will create a new entity builder for generating entities.
type GroupBuilder ¶
type GroupBuilder interface { // Name will use the Label.String() method value of the generated value from the label template. Name(template labels.Template) GroupBuilder // AddMetric will add the metric of the given type with the given distribution. AddMetric(metricType metrics.Type, value generation.Distribution) GroupBuilder // AddLabel will add a label generated by the label template. AddLabel(template labels.Template) GroupBuilder // Generate will generate a group that depends on the random source and the time. Generate(random generation.Random, time time.Duration) *placement.Group }
GroupBuilder is used to generate new groups for use in tests and benchmarks.
func NewGroupBuilder ¶
func NewGroupBuilder() GroupBuilder
NewGroupBuilder will create a new group builder for generating groups.
type OrderingBuilder ¶
type OrderingBuilder interface { // Generate will generate an ordering that depends on the random source and the time. Generate(random generation.Random, time time.Duration) placement.Ordering }
OrderingBuilder is used to generate new ordering for use in tests and benchmarks.
type RequirementBuilder ¶
type RequirementBuilder interface { // Generate will generate a requirement and a metric set that depends on the random source and the time. Generate(random generation.Random, time time.Duration) placement.Requirement }
RequirementBuilder is used to generate new requirements for use in tests and benchmarks.
Click to show internal directories.
Click to hide internal directories.