Documentation
¶
Index ¶
- Variables
- func CopyTemplateFile(src string, dst string) error
- func CopyTemplateFiles(srcDir string, destDir string) ([]string, error)
- func Read(name string) ([]byte, error)
- func ReadAsString(name string) (string, error)
- func ReadDir(dir string) ([]string, error)
- func RemoveTemplateFiles(srcDir string, destDir string) ([]string, error)
- func Render(templateSrc string, data any) (string, error)
- type AlloyData
- type AlloyModuleData
- type AlloyRemote
- type KubeadmInitData
- type MetallbData
Constants ¶
This section is empty.
Variables ¶
View Source
var Files embed.FS
Functions ¶
func CopyTemplateFile ¶
func CopyTemplateFiles ¶
CopyTemplateFiles copies configuration files from the embedded templates to the destination directory. It overwrites existing files in the destination directory. It returns a list of copied files.
func ReadAsString ¶
func RemoveTemplateFiles ¶
RemoveTemplateFiles removes configuration files from the destination directory that were copied from the source directory. It returns a list of removed files.
Types ¶
type AlloyData ¶ added in v0.7.0
type AlloyData struct {
ClusterName string
PrometheusRemotes []AlloyRemote
LokiRemotes []AlloyRemote
PrometheusForwardTo string // Comma-separated list of prometheus remote receivers
LokiForwardTo string // Comma-separated list of loki remote receivers
MonitorBlockNode bool
}
AlloyData contains data for rendering the main Alloy configuration templates.
type AlloyModuleData ¶ added in v0.9.0
type AlloyModuleData struct {
ClusterName string
PrometheusForwardTo string // Comma-separated list of prometheus remote receivers
LokiForwardTo string // Comma-separated list of loki remote receivers
}
AlloyModuleData contains data for rendering individual Alloy module templates. This is used for modules that only need cluster name and forward-to receivers.
type AlloyRemote ¶ added in v0.9.0
type AlloyRemote struct {
Name string // Unique identifier for this remote (used in Alloy config block names)
URL string // Remote write URL
Username string // Basic auth username
PasswordEnvVar string // Environment variable name containing the password
}
AlloyRemote represents a single remote endpoint for Prometheus or Loki.
type KubeadmInitData ¶
type MetallbData ¶
type MetallbData struct {
MachineIP string
}
Click to show internal directories.
Click to hide internal directories.