examples

package
v0.0.0-...-c0686e8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2022 License: Apache-2.0, MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Instance is used to represent a Schemaless instance in label templates.
	Instance = Variable("instance")

	// Cluster is used to represent a Schemaless cluster in label templates.
	Cluster = Variable("cluster")

	// Database is used to represent a Schemaless database in label templates.
	Database = Variable("database")

	// Datacenter is used to represent a datacenter name in label templates.
	Datacenter = Variable("datacenter")

	// Host is used to represent a host name in label templates.
	Host = Variable("host")

	// Rack is used to represent a rack name in label templates.
	Rack = Variable("rack")

	// VolumeType is used to represent a volume type of a group.
	VolumeType = Variable("volume-type")
)

Variables

This section is empty.

Functions

func CreateHostGroups

func CreateHostGroups(random generation.Random, builder placement.GroupBuilder, templates labels.TemplateSet, racks,
	hosts int) []*mPlacement.Group

CreateHostGroups will create a given number of groups representing hosts distributed over a given number of racks and all belonging to the same datacenter.

func CreateHostGroupsBuilder

func CreateHostGroupsBuilder() (builder placement.GroupBuilder, templates labels.TemplateSet)

CreateHostGroupsBuilder will create a builder to generate groups representing hosts that belong to a rack in a datacenter.

func CreateSchemalessEntities

func CreateSchemalessEntities(random generation.Random, builder placement.EntityBuilder, templates labels.TemplateSet,
	clusters, perCluster int) []*mPlacement.Entity

CreateSchemalessEntities will create a list of entities that represents the databases for all the clusters of a Schemaless instance.

func CreateSchemalessEntityBuilder

func CreateSchemalessEntityBuilder() (builder placement.EntityBuilder, variables labels.TemplateSet)

CreateSchemalessEntityBuilder creates an entity builder for creating entities representing Schemaless databases.

Types

type Variable

type Variable string

Variable represents a variable that can be used in a label template.

func (Variable) Name

func (variable Variable) Name() string

Name returns the name of the variable.

func (Variable) Variable

func (variable Variable) Variable() string

Variable returns the name of the variable quoted with $-signs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL