Documentation
¶
Index ¶
- Constants
- Variables
- func ActiveInstanceId() string
- func ActiveInstancePath() string
- func AddBootstrapExtension(ext BootstrapExtension)
- func AllocateDump(run string) string
- func AllocateForensicScenario(run, scenario string) string
- func Bootstrap() error
- func BootstrapBindings() error
- func BootstrapInstance() error
- func BuildPath() string
- func ConfigBuild() string
- func ConfigDir() (string, error)
- func CreateLabel(instanceId string, bindings map[string]string) error
- func GetScopedEntityPath(entity Entity) []string
- func HomeDir() string
- func InitModel(m *Model)
- func KitBuild() string
- func ListDumps() ([]string, error)
- func MakeBuildPath(path string) string
- func NewInstance(id, workingDirectory string) (string, error)
- func PersistConfig(config *FablabConfig) error
- func PkiBuild() string
- func ScriptBuild() string
- func Selector(levels ...string) string
- func SetActiveInstance(newInstanceId string) error
- type Action
- type ActionBinder
- type ActionBinders
- type ActionFunc
- type ActivationStage
- type ActivationStages
- type BootstrapExtension
- type CachingVariableResolver
- type ChainedVariableResolver
- type CmdLineArgVariableResolver
- type Component
- func (component *Component) Accept(visitor EntityVisitor)
- func (component *Component) CloneComponent(scaleIndex uint32) *Component
- func (component *Component) GetChildren() []Entity
- func (component *Component) GetHost() *Host
- func (component *Component) GetId() string
- func (component *Component) GetModel() *Model
- func (component *Component) GetParentEntity() Entity
- func (component *Component) GetPath() string
- func (component *Component) GetPathId() string
- func (component *Component) GetRegion() *Region
- func (component *Component) GetScope() *Scope
- func (component *Component) GetType() string
- func (component *Component) Matches(entityType string, matcher EntityMatcher) bool
- func (component *Component) Region() *Region
- type ComponentDump
- type Components
- type ConfigurationStage
- type ConfigurationStages
- type CpuTimeslice
- type Data
- type DataMetricsWriter
- type DefaultScaleEntityFactory
- func (self DefaultScaleEntityFactory) CreateScaledComponent(source *Component, scaleIndex uint32) (*Component, error)
- func (self DefaultScaleEntityFactory) CreateScaledHost(source *Host, scaleIndex uint32) (*Host, error)
- func (self DefaultScaleEntityFactory) CreateScaledRegion(source *Region, scaleIndex uint32) (*Region, error)
- type DisposalStage
- type DisposalStages
- type DistributionStage
- type DistributionStages
- type Dump
- type Entity
- type EntityMatcher
- type EntityVisitor
- type EnvVariableResolver
- type FablabConfig
- type Factory
- type HierarchicalVariableResolver
- type Host
- func (host *Host) Accept(visitor EntityVisitor)
- func (host *Host) CloneHost(scaleIndex uint32) *Host
- func (host *Host) GetChildren() []Entity
- func (host *Host) GetId() string
- func (host *Host) GetModel() *Model
- func (host *Host) GetParentEntity() Entity
- func (host *Host) GetPath() string
- func (host *Host) GetRegion() *Region
- func (host *Host) GetScope() *Scope
- func (host *Host) GetType() string
- func (host *Host) Matches(entityType string, matcher EntityMatcher) bool
- func (host *Host) RangeSortedComponents(f func(id string, component *Component))
- func (host *Host) RemoveComponent(component *Component)
- type HostDump
- type HostSummary
- type Hosts
- type IdPool
- type InfrastructureStage
- type InfrastructureStages
- type InstanceConfig
- type InstanceState
- type IperfSummary
- type IperfTimeslice
- type IperfUdpSummary
- type IperfUdpTimeslice
- type Label
- type MapVariableResolver
- type MemoryTimeslice
- type MetricSet
- type MetricsEvent
- type MetricsHandler
- type Model
- func (m *Model) Accept(visitor EntityVisitor)
- func (m *Model) AcceptHostMetrics(host *Host, event *MetricsEvent)
- func (m *Model) Activate(run Run) error
- func (m *Model) AddActivationActions(actions ...string)
- func (m *Model) AddActivationStage(stage ActivationStage)
- func (m *Model) AddActivationStages(stage ...ActivationStage)
- func (m *Model) AddOperatingActions(actions ...string)
- func (m *Model) AddOperatingStage(stage OperatingStage)
- func (m *Model) AddOperatingStageF(stage OperatingStageF)
- func (m *Model) AddOperatingStages(stages ...OperatingStage)
- func (m *Model) BindLabel(l *Label)
- func (m *Model) Build(run Run) error
- func (m *Model) Dispose(run Run) error
- func (m *Model) Dump() *Dump
- func (m *Model) Express(run Run) error
- func (m *Model) ForEachComponent(spec string, concurrency int, f func(c *Component) error) error
- func (m *Model) ForEachHost(spec string, concurrency int, f func(host *Host) error) error
- func (m *Model) GetAction(name string) (Action, bool)
- func (m *Model) GetActions() []string
- func (m *Model) GetChildren() []Entity
- func (m *Model) GetId() string
- func (m *Model) GetModel() *Model
- func (m *Model) GetNextComponentIndex() uint32
- func (m *Model) GetNextHostIndex() uint32
- func (m *Model) GetNextRegionIndex() uint32
- func (m *Model) GetParentEntity() Entity
- func (m *Model) GetResource(name string) fs.FS
- func (m *Model) GetScope() *Scope
- func (m *Model) GetType() string
- func (m *Model) IsBound() bool
- func (m *Model) IterateScopes(f func(i Entity, path ...string))
- func (m *Model) Matches(entityType string, matcher EntityMatcher) bool
- func (m *Model) MustSelectHost(spec string) *Host
- func (m *Model) MustSelectHosts(spec string, minCount int) ([]*Host, error)
- func (m *Model) MustSelectRegion(spec string) *Region
- func (m *Model) Operate(run Run) error
- func (m *Model) RangeSortedRegions(f func(id string, region *Region))
- func (m *Model) RemoveRegion(region *Region)
- func (m *Model) SelectComponent(spec string) (*Component, error)
- func (m *Model) SelectComponents(spec string) []*Component
- func (m *Model) SelectHost(spec string) (*Host, error)
- func (m *Model) SelectHosts(spec string) []*Host
- func (m *Model) SelectRegion(spec string) (*Region, error)
- func (m *Model) SelectRegions(spec string) []*Region
- func (m *Model) Sync(run Run) error
- type OperatingStage
- type OperatingStageF
- type OperatingStages
- type ProcessTimeslice
- type Region
- func (region *Region) Accept(visitor EntityVisitor)
- func (region *Region) CloneRegion(scaleIndex uint32) *Region
- func (region *Region) GetChildren() []Entity
- func (region *Region) GetId() string
- func (region *Region) GetModel() *Model
- func (region *Region) GetParentEntity() Entity
- func (region *Region) GetScope() *Scope
- func (region *Region) GetType() string
- func (region *Region) Matches(entityType string, matcher EntityMatcher) bool
- func (region *Region) RangeSortedHosts(f func(id string, host *Host))
- func (region *Region) RemoveHost(host *Host)
- func (region *Region) SelectHosts(hostSpec string) map[string]*Host
- type RegionDump
- type Regions
- type Resource
- type Resources
- type Run
- type ScaleEntityFactory
- type ScaleFactory
- type ScaleStrategy
- type Scope
- func (scope *Scope) CloneScope() *Scope
- func (scope *Scope) GetBoolVariable(name string) (bool, bool)
- func (scope *Scope) GetRequiredStringVariable(holder errorz.ErrorHolder, name string) string
- func (scope *Scope) GetStringVariable(name string) (string, bool)
- func (scope *Scope) GetStringVariableOr(name string, defaultValue string) string
- func (scope *Scope) GetVariable(name string) (interface{}, bool)
- func (scope *Scope) GetVariableOr(name string, defaultValue interface{}) interface{}
- func (scope *Scope) HasLocalOrAncestralTag(tag string) bool
- func (scope *Scope) HasTag(tag string) bool
- func (scope *Scope) HasVariable(name string) bool
- func (scope *Scope) MustStringVariable(name string) string
- func (scope *Scope) MustVariable(name string) interface{}
- func (scope *Scope) PutVariable(name string, value interface{})
- func (scope *Scope) WithTags(tags ...string) *Scope
- type ScopeDump
- type ScopedVariableResolver
- type StdOutMetricsWriter
- type Tags
- type Templater
- type VarConfig
- type VariableDump
- type VariableNameMapper
- type VariableNameParser
- type VariableNamePrefixMapper
- type VariableResolver
- type Variables
- type ZitiFabricLinkMetricsSummary
- type ZitiFabricLinkSummary
- type ZitiFabricMeshSummary
- type ZitiFabricRouterMetricsSummary
Constants ¶
View Source
const ( DefaultWritePermissions = 0700 ConfigFileName = "config.yml" )
View Source
const ( EntityTypeModel = "model" EntityTypeRegion = "region" EntityTypeHost = "host" EntityTypeComponent = "component" EntityTypeParent = "parent" EntityTypeSelfOrParent = "selfOrParent" EntityTypeSelfOrParentSymbol = "^" EntityTypeChild = "child" EntityTypeSelfOrChild = "selfOrChild" EntityTypeAny = "*" )
View Source
const ( SelectorTagPrefix = "." SelectorIdPrefix = "#" )
View Source
const Version = "0.4.0 (tw3n7ytw3n7y0n3)"
Variables ¶
View Source
var CliInstanceId string
Functions ¶
func ActiveInstanceId ¶
func ActiveInstanceId() string
func ActiveInstancePath ¶
func ActiveInstancePath() string
func AddBootstrapExtension ¶
func AddBootstrapExtension(ext BootstrapExtension)
func AllocateDump ¶
func BootstrapBindings ¶
func BootstrapBindings() error
func BootstrapInstance ¶
func BootstrapInstance() error
func ConfigBuild ¶
func ConfigBuild() string
func GetScopedEntityPath ¶ added in v0.4.0
func MakeBuildPath ¶ added in v0.4.0
func NewInstance ¶
func PersistConfig ¶ added in v0.4.0
func PersistConfig(config *FablabConfig) error
func ScriptBuild ¶
func ScriptBuild() string
func SetActiveInstance ¶
Types ¶
type ActionBinder ¶
func Bind ¶ added in v0.4.1
func Bind(action Action) ActionBinder
type ActionBinders ¶
type ActionBinders map[string]ActionBinder
type ActionFunc ¶
func (ActionFunc) Execute ¶
func (f ActionFunc) Execute(m *Model) error
type ActivationStage ¶
type ActivationStages ¶
type ActivationStages []ActivationStage
type BootstrapExtension ¶
type CachingVariableResolver ¶ added in v0.4.0
type CachingVariableResolver struct {
// contains filtered or unexported fields
}
func NewCachingVariableResolver ¶ added in v0.4.0
func NewCachingVariableResolver(resolver VariableResolver) *CachingVariableResolver
type ChainedVariableResolver ¶ added in v0.4.0
type ChainedVariableResolver struct {
// contains filtered or unexported fields
}
func (*ChainedVariableResolver) AppendResolver ¶ added in v0.4.0
func (self *ChainedVariableResolver) AppendResolver(resolver VariableResolver)
type CmdLineArgVariableResolver ¶ added in v0.4.0
type CmdLineArgVariableResolver struct{}
type Component ¶
type Component struct {
Scope
Id string
Host *Host
ScriptSrc string
ScriptName string
ConfigSrc string
ConfigName string
BinaryName string
PublicIdentity string
PrivateIdentity string
Index uint32
ScaleIndex uint32
RunWithSudo bool
}
func (*Component) Accept ¶
func (component *Component) Accept(visitor EntityVisitor)
func (*Component) CloneComponent ¶ added in v0.4.1
func (*Component) GetChildren ¶
func (*Component) GetParentEntity ¶
type ComponentDump ¶
type ComponentDump struct {
Scope *ScopeDump `json:"scope,omitempty"`
ScriptSrc string `json:"script_src,omitempty"`
ScriptName string `json:"script_name,omitempty"`
ConfigSrc string `json:"config_src,omitempty"`
ConfigName string `json:"config_name,omitempty"`
BinaryName string `json:"binary_name,omitempty"`
PublicIdentity string `json:"public_identity,omitempty"`
PrivateIdentity string `json:"private_identity,omitempty"`
}
type Components ¶
type ConfigurationStage ¶
type ConfigurationStages ¶
type ConfigurationStages []ConfigurationStage
type CpuTimeslice ¶
type CpuTimeslice struct {
TimestampMs int64 `json:"timestamp_ms"`
PercentUser float64 `json:"percent_user"`
PercentNice float64 `json:"percent_nice"`
PercentSystem float64 `json:"percent_system"`
PercentIowait float64 `json:"percent_iowait"`
PercentSteal float64 `json:"percent_steal"`
PercentIdle float64 `json:"percent_idle"`
}
type DataMetricsWriter ¶
type DataMetricsWriter struct {
}
func (DataMetricsWriter) AcceptHostMetrics ¶
func (DataMetricsWriter) AcceptHostMetrics(host *Host, event *MetricsEvent)
type DefaultScaleEntityFactory ¶ added in v0.4.1
type DefaultScaleEntityFactory struct{}
func (DefaultScaleEntityFactory) CreateScaledComponent ¶ added in v0.4.1
func (self DefaultScaleEntityFactory) CreateScaledComponent(source *Component, scaleIndex uint32) (*Component, error)
func (DefaultScaleEntityFactory) CreateScaledHost ¶ added in v0.4.1
func (self DefaultScaleEntityFactory) CreateScaledHost(source *Host, scaleIndex uint32) (*Host, error)
func (DefaultScaleEntityFactory) CreateScaledRegion ¶ added in v0.4.1
func (self DefaultScaleEntityFactory) CreateScaledRegion(source *Region, scaleIndex uint32) (*Region, error)
type DisposalStage ¶
type DisposalStages ¶
type DisposalStages []DisposalStage
type DistributionStage ¶
type DistributionStages ¶
type DistributionStages []DistributionStage
type Dump ¶
type Dump struct {
Scope *ScopeDump `json:"scope,omitempty"`
Regions map[string]*RegionDump `json:"regions"`
}
type Entity ¶
type Entity interface {
GetModel() *Model
GetType() string
GetId() string
GetScope() *Scope
GetParentEntity() Entity
Accept(EntityVisitor)
GetChildren() []Entity
Matches(entityType string, matcher EntityMatcher) bool
GetVariable(name string) (interface{}, bool)
GetVariableOr(name string, defaultValue interface{}) interface{}
MustVariable(name string) interface{}
}
type EntityMatcher ¶
func (EntityMatcher) And ¶
func (m EntityMatcher) And(m2 EntityMatcher) EntityMatcher
func (EntityMatcher) Or ¶
func (m EntityMatcher) Or(m2 EntityMatcher) EntityMatcher
type EntityVisitor ¶
type EntityVisitor func(Entity)
type EnvVariableResolver ¶ added in v0.4.0
type EnvVariableResolver struct{}
type FablabConfig ¶ added in v0.4.0
type FablabConfig struct {
Instances map[string]*InstanceConfig `yaml:"instances"`
Default string `yaml:"default"`
ConfigPath string `yaml:"-"`
}
func GetConfig ¶ added in v0.4.0
func GetConfig() *FablabConfig
func (*FablabConfig) GetSelectedInstanceId ¶ added in v0.4.0
func (self *FablabConfig) GetSelectedInstanceId() string
type HierarchicalVariableResolver ¶ added in v0.4.0
type HierarchicalVariableResolver struct{}
type Host ¶
type Host struct {
Scope
Id string
Region *Region
PublicIp string
PrivateIp string
InstanceType string
InstanceResourceType string
SpotPrice string
SpotType string
Components Components
Index uint32
ScaleIndex uint32
}
func (*Host) Accept ¶
func (host *Host) Accept(visitor EntityVisitor)
func (*Host) GetChildren ¶
func (*Host) GetParentEntity ¶
func (*Host) RangeSortedComponents ¶ added in v0.4.1
func (*Host) RemoveComponent ¶ added in v0.4.1
type HostDump ¶
type HostDump struct {
Scope *ScopeDump `json:"scope,omitempty"`
PublicIp string `json:"public_ip,omitempty"`
PrivateIp string `json:"private_ip,omitempty"`
InstanceType string `json:"instance_type,omitempty"`
InstanceResourceType string `json:"instance_resource_type,omitempty"`
SpotPrice string `json:"spot_price,omitempty"`
SpotType string `json:"spot_type,omitempty"`
Components map[string]*ComponentDump `json:"components,omitempty"`
}
type HostSummary ¶
type HostSummary struct {
Cpu []*CpuTimeslice `json:"cpu,omitempty"`
Memory []*MemoryTimeslice `json:"memory,omitempty"`
Process []*ProcessTimeslice `json:"process,omitempty"`
}
func (*HostSummary) ToMetricsEvents ¶
func (hs *HostSummary) ToMetricsEvents() (events []*MetricsEvent)
type InfrastructureStage ¶
type InfrastructureStages ¶
type InfrastructureStages []InfrastructureStage
type InstanceConfig ¶ added in v0.4.0
type InstanceConfig struct {
Id string `yaml:"name"`
Model string `yaml:"model"`
WorkingDirectory string `yaml:"working_directory"`
}
func GetActiveInstanceConfig ¶ added in v0.4.0
func GetActiveInstanceConfig() *InstanceConfig
func (*InstanceConfig) CleanupWorkingDir ¶ added in v0.4.0
func (self *InstanceConfig) CleanupWorkingDir() error
func (*InstanceConfig) LoadLabel ¶ added in v0.4.0
func (self *InstanceConfig) LoadLabel() (*Label, error)
type InstanceState ¶
type InstanceState int
const ( Created InstanceState = iota Expressed Configured Distributed Activated Operating Disposed )
func (InstanceState) String ¶
func (instanceState InstanceState) String() string
type IperfSummary ¶
type IperfSummary struct {
Timeslices []*IperfTimeslice `json:"timeslices"`
Bytes float64 `json:"bytes"`
BitsPerSecond float64 `json:"bits_per_second"`
}
type IperfTimeslice ¶
type IperfUdpSummary ¶
type IperfUdpSummary struct {
Timeslices []*IperfUdpTimeslice `json:"timeslices"`
Bytes float64 `json:"bytes"`
BitsPerSecond float64 `json:"bits_per_second"`
JitterMs float64 `json:"jitter_ms"`
LostPackets float64 `json:"lost_packets"`
}
type IperfUdpTimeslice ¶
type Label ¶
type Label struct {
InstanceId string `yaml:"id"`
Model string `yaml:"model"`
State InstanceState `yaml:"state"`
Bindings Variables `yaml:"bindings"`
// contains filtered or unexported fields
}
func (*Label) GetFilePath ¶
func (*Label) SaveAtPath ¶
type MapVariableResolver ¶ added in v0.4.0
type MapVariableResolver struct {
// contains filtered or unexported fields
}
func NewMapVariableResolver ¶ added in v0.4.0
func NewMapVariableResolver(context string, variables Variables) *MapVariableResolver
func (*MapVariableResolver) Resolve ¶ added in v0.4.0
func (self *MapVariableResolver) Resolve(entity Entity, name string, _ bool) (interface{}, bool)
func (*MapVariableResolver) UpdateVariables ¶ added in v0.4.0
func (self *MapVariableResolver) UpdateVariables(variables Variables)
type MemoryTimeslice ¶
type MemoryTimeslice struct {
TimestampMs int64 `json:"timestamp_ms"`
MemFreeK int64 `json:"free_k"`
AvailK int64 `json:"avail_k"`
UsedK int64 `json:"used_k"`
UsedPercent float64 `json:"used_percent"`
BuffersK int64 `json:"buffers_k"`
CachedK int64 `json:"cached_k"`
CommitK int64 `json:"commit_k"`
CommitPercent float64 `json:"commit_percent"`
ActiveK int64 `json:"active_k"`
InactiveK int64 `json:"inactive_k"`
DirtyK int64 `json:"dirty_k"`
}
type MetricSet ¶
type MetricSet map[string]interface{}
func (MetricSet) AddGroupedMetric ¶
func (MetricSet) VisitGroupedMetrics ¶
func (MetricSet) VisitUngroupedMetrics ¶
type MetricsEvent ¶
type MetricsHandler ¶
type MetricsHandler interface {
AcceptHostMetrics(host *Host, event *MetricsEvent)
}
type Model ¶
type Model struct {
Id string
Scope
VarConfig VarConfig
Regions Regions
StructureFactories []Factory // Factories that change the model structure, eg: add/remove hosts
Factories []Factory
BootstrapExtensions []BootstrapExtension
Actions map[string]ActionBinder
Infrastructure InfrastructureStages
Configuration ConfigurationStages
Distribution DistributionStages
Activation ActivationStages
Operation OperatingStages
Disposal DisposalStages
MetricsHandlers []MetricsHandler
Resources Resources
// contains filtered or unexported fields
}
func (*Model) Accept ¶
func (m *Model) Accept(visitor EntityVisitor)
func (*Model) AcceptHostMetrics ¶
func (m *Model) AcceptHostMetrics(host *Host, event *MetricsEvent)
func (*Model) AddActivationActions ¶
func (*Model) AddActivationStage ¶
func (m *Model) AddActivationStage(stage ActivationStage)
func (*Model) AddActivationStages ¶
func (m *Model) AddActivationStages(stage ...ActivationStage)
func (*Model) AddOperatingActions ¶
func (*Model) AddOperatingStage ¶
func (m *Model) AddOperatingStage(stage OperatingStage)
func (*Model) AddOperatingStageF ¶ added in v0.4.0
func (m *Model) AddOperatingStageF(stage OperatingStageF)
func (*Model) AddOperatingStages ¶
func (m *Model) AddOperatingStages(stages ...OperatingStage)
func (*Model) ForEachComponent ¶
func (*Model) ForEachHost ¶
func (*Model) GetActions ¶ added in v0.4.1
func (*Model) GetChildren ¶
func (*Model) GetNextComponentIndex ¶ added in v0.4.1
func (*Model) GetNextHostIndex ¶ added in v0.4.1
func (*Model) GetNextRegionIndex ¶ added in v0.4.1
func (*Model) GetParentEntity ¶
func (*Model) IterateScopes ¶
func (*Model) MustSelectHost ¶
func (*Model) MustSelectHosts ¶
func (*Model) MustSelectRegion ¶
func (*Model) RangeSortedRegions ¶ added in v0.4.1
func (*Model) RemoveRegion ¶ added in v0.4.1
func (*Model) SelectComponents ¶
func (*Model) SelectHosts ¶
func (*Model) SelectRegions ¶
type OperatingStage ¶
type OperatingStageF ¶ added in v0.4.0
func (OperatingStageF) Operate ¶ added in v0.4.0
func (self OperatingStageF) Operate(run Run) error
type OperatingStages ¶
type OperatingStages []OperatingStage
type ProcessTimeslice ¶
type ProcessTimeslice struct {
TimestampMs int64 `json:"timestamp_ms"`
RunQueueSize int64 `json:"run_queue_size"`
ProcessListSize int64 `json:"process_list_size"`
LoadAverage1m float64 `json:"load_average_1m"`
LoadAverage5m float64 `json:"load_average_5m"`
LoadAverage15m float64 `json:"load_average_15m"`
Blocked int64 `json:"blocked"`
}
type Region ¶
type Region struct {
Scope
Model *Model
Id string
Region string
Site string
Hosts Hosts
Index uint32
ScaleIndex uint32
}
func (*Region) Accept ¶
func (region *Region) Accept(visitor EntityVisitor)
func (*Region) CloneRegion ¶ added in v0.4.1
func (*Region) GetChildren ¶
func (*Region) GetParentEntity ¶
func (*Region) Matches ¶
func (region *Region) Matches(entityType string, matcher EntityMatcher) bool
func (*Region) RangeSortedHosts ¶ added in v0.4.1
func (*Region) RemoveHost ¶ added in v0.4.1
type RegionDump ¶
type ScaleEntityFactory ¶ added in v0.4.1
type ScaleFactory ¶ added in v0.4.1
type ScaleFactory struct {
Strategy ScaleStrategy
EntityFactory ScaleEntityFactory
}
func NewScaleFactory ¶ added in v0.4.1
func NewScaleFactory(strategy ScaleStrategy, factory ScaleEntityFactory) *ScaleFactory
func NewScaleFactoryWithDefaultEntityFactory ¶ added in v0.4.1
func NewScaleFactoryWithDefaultEntityFactory(strategy ScaleStrategy) *ScaleFactory
func (*ScaleFactory) Build ¶ added in v0.4.1
func (factory *ScaleFactory) Build(m *Model) error
func (*ScaleFactory) ProcessComponents ¶ added in v0.4.1
func (factory *ScaleFactory) ProcessComponents(m *Model) error
func (*ScaleFactory) ProcessHosts ¶ added in v0.4.1
func (factory *ScaleFactory) ProcessHosts(m *Model) error
func (*ScaleFactory) ProcessRegions ¶ added in v0.4.1
func (factory *ScaleFactory) ProcessRegions(m *Model) error
type ScaleStrategy ¶ added in v0.4.1
type Scope ¶
type Scope struct {
Defaults Variables
VariableResolver VariableResolver
Data Data
Tags Tags
// contains filtered or unexported fields
}
func (*Scope) CloneScope ¶ added in v0.4.1
func (*Scope) GetBoolVariable ¶ added in v0.4.0
func (*Scope) GetRequiredStringVariable ¶ added in v0.4.0
func (scope *Scope) GetRequiredStringVariable(holder errorz.ErrorHolder, name string) string
func (*Scope) GetStringVariable ¶ added in v0.4.0
func (*Scope) GetStringVariableOr ¶ added in v0.4.0
func (*Scope) GetVariable ¶ added in v0.4.0
func (*Scope) GetVariableOr ¶ added in v0.4.0
func (*Scope) HasLocalOrAncestralTag ¶ added in v0.4.1
func (*Scope) HasVariable ¶ added in v0.4.0
func (*Scope) MustStringVariable ¶ added in v0.4.0
func (*Scope) MustVariable ¶ added in v0.4.0
func (*Scope) PutVariable ¶ added in v0.4.0
type ScopedVariableResolver ¶ added in v0.4.0
type ScopedVariableResolver struct {
// contains filtered or unexported fields
}
func NewScopedVariableResolver ¶ added in v0.4.0
func NewScopedVariableResolver(resolver VariableResolver) *ScopedVariableResolver
type StdOutMetricsWriter ¶
type StdOutMetricsWriter struct {
}
func (StdOutMetricsWriter) AcceptHostMetrics ¶
func (StdOutMetricsWriter) AcceptHostMetrics(host *Host, event *MetricsEvent)
type Templater ¶ added in v0.4.1
type Templater struct {
errorz.ErrorHolderImpl
// contains filtered or unexported fields
}
func (*Templater) TemplatizeComponent ¶ added in v0.4.1
func (*Templater) TemplatizeHost ¶ added in v0.4.1
func (*Templater) TemplatizeRegion ¶ added in v0.4.1
func (*Templater) TemplatizeScope ¶ added in v0.4.1
func (*Templater) TemplatizeString ¶ added in v0.4.1
type VarConfig ¶ added in v0.4.0
type VarConfig struct {
VariableNameParser VariableNameParser
CommandLineVariableNameMapper VariableNameMapper
CommandLinePrefixes []string
EnvVariableNameMapper VariableNameMapper
DefaultVariableResolver VariableResolver
DefaultScopedVariableResolver VariableResolver
SecretsKeys []string
VariableNamePrefixMapper VariableNamePrefixMapper
ResolverLogger func(resolver string, entity Entity, name string, result interface{}, found bool, msgAndArgs ...interface{})
BindingResolver *MapVariableResolver
LabelResolver *MapVariableResolver
}
func (*VarConfig) EnableDebugLogger ¶ added in v0.4.0
func (self *VarConfig) EnableDebugLogger()
func (*VarConfig) SetDefaults ¶ added in v0.4.0
func (self *VarConfig) SetDefaults()
type VariableDump ¶
type VariableDump struct {
Description string `json:"description,omitempty"`
Default string `json:"default,omitempty"`
Required bool `json:"required"`
Scoped bool `json:"scoped"`
GlobalFallback bool `json:"global_fallback"`
Sensitive bool `json:"sensitive"`
Binder string `json:"binder,omitempty"`
Value string `json:"value,omitempty"`
Bound bool `json:"bound"`
}
type VariableNameMapper ¶ added in v0.4.0
type VariableNameParser ¶ added in v0.4.0
type VariableNamePrefixMapper ¶ added in v0.4.0
type VariableResolver ¶ added in v0.4.0
type Variables ¶
type Variables map[string]interface{}
func (Variables) Canonicalize ¶ added in v0.4.0
func (v Variables) Canonicalize()
type ZitiFabricLinkSummary ¶
type ZitiFabricMeshSummary ¶
type ZitiFabricMeshSummary struct {
TimestampMs int64 `json:"timestamp_ms"`
RouterIds []string `json:"router_ids"`
Links []ZitiFabricLinkSummary `json:"links,omitempty"`
}
type ZitiFabricRouterMetricsSummary ¶
type ZitiFabricRouterMetricsSummary struct {
SourceId string `json:"source_id"`
TimestampMs int64 `json:"timestamp_ms"`
FabricRxBytesRateM1 float64 `json:"fabric_rx_bytes_rate_m1"`
FabricTxBytesRateM1 float64 `json:"fabric_tx_bytes_rate_m1"`
IngressRxBytesRateM1 float64 `json:"ingress_rx_bytes_rate_m1"`
IngressTxBytesRateM1 float64 `json:"ingress_tx_bytes_rate_m1"`
EgressRxBytesRateM1 float64 `json:"egress_rx_bytes_rate_m1"`
EgressTxBytesRateM1 float64 `json:"egress_tx_bytes_rate_m1"`
Links []ZitiFabricLinkMetricsSummary `json:"links,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.