macro

package
v0.0.0-...-329b25f Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MacrosNamespace is a sanitized namespace name where ClickHouseInstallation runs
	MacrosNamespace = "{namespace}"

	// MacrosCRName is a sanitized Custom Resource name
	MacrosCRName = "{chi}"

	// MacrosClusterName is a sanitized cluster name
	MacrosClusterName = "{cluster}"
	// MacrosClusterIndex is an index of the cluster in the CHI - integer number, converted into string
	MacrosClusterIndex = "{clusterIndex}"

	// MacrosShardName is a sanitized shard name
	MacrosShardName = "{shard}"
	// MacrosShardIndex is an index of the shard in the cluster - integer number, converted into string
	MacrosShardIndex = "{shardIndex}"

	// MacrosReplicaName is a sanitized replica name
	MacrosReplicaName = "{replica}"
	// MacrosReplicaIndex is an index of the replica in the cluster - integer number, converted into string
	MacrosReplicaIndex = "{replicaIndex}"

	// MacrosHostName is a sanitized host name
	MacrosHostName = "{host}"
	// MacrosCRScopeIndex is an index of the host on the CHI-scope
	MacrosCRScopeIndex = "{chiScopeIndex}"
	// MacrosCRScopeCycleIndex is an index of the host in the CHI-scope cycle - integer number, converted into string
	MacrosCRScopeCycleIndex = "{chiScopeCycleIndex}"
	// MacrosCRScopeCycleOffset is an offset of the host in the CHI-scope cycle - integer number, converted into string
	MacrosCRScopeCycleOffset = "{chiScopeCycleOffset}"
	// MacrosClusterScopeIndex is an index of the host on the cluster-scope
	MacrosClusterScopeIndex = "{clusterScopeIndex}"
	// MacrosClusterScopeCycleIndex is an index of the host in the Cluster-scope cycle - integer number, converted into string
	MacrosClusterScopeCycleIndex = "{clusterScopeCycleIndex}"
	// MacrosClusterScopeCycleOffset is an offset of the host in the Cluster-scope cycle - integer number, converted into string
	MacrosClusterScopeCycleOffset = "{clusterScopeCycleOffset}"
	// MacrosShardScopeIndex is an index of the host on the shard-scope
	MacrosShardScopeIndex = "{shardScopeIndex}"
	// MacrosReplicaScopeIndex is an index of the host on the replica-scope
	MacrosReplicaScopeIndex = "{replicaScopeIndex}"
	// MacrosClusterScopeCycleHeadPointsToPreviousCycleTail is {clusterScopeIndex} of previous Cycle Tail
	MacrosClusterScopeCycleHeadPointsToPreviousCycleTail = "{clusterScopeCycleHeadPointsToPreviousCycleTail}"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

Engine

func New

func New(macros types.List) *Engine

New

func (*Engine) Get

func (e *Engine) Get(macros string) string

func (*Engine) Line

func (e *Engine) Line(line string) string

Line expands line with macros(es)

func (*Engine) Map

func (e *Engine) Map(_map map[string]string) map[string]string

Map expands map with macros(es)

func (*Engine) Scope

func (e *Engine) Scope(scope any) interfaces.IMacro

Jump to

Keyboard shortcuts

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