sync_commands

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Name         string            `koanf:"name"`
	Disabled     bool              `koanf:"disabled"`
	AllowFailure bool              `koanf:"allow_failure"`
	Cmd          string            `koanf:"cmd"`
	Args         []string          `koanf:"args"`
	Environment  map[string]string `koanf:"environment"`
	StreamOutput bool              `koanf:"stream_output"`
	// contains filtered or unexported fields
}

Command is a command to run, contains valid templated strings

func (*Command) ExecuteWithData

func (c *Command) ExecuteWithData(data CommandTemplateData) (err error)

ExecuteWithData executes the command with the provided template data

func (*Command) Parse

func (c *Command) Parse() (err error)

NewCommand creates a new Command from a config

type CommandTemplateData

type CommandTemplateData struct {
	CommandIndex                int
	ValidatorClient             string
	ValidatorRPCURL             string
	ValidatorRole               string
	ValidatorRoleIsPassive      bool
	ValidatorRoleIsActive       bool
	ValidatorIdentityPublicKey  string
	ClusterName                 string
	Hostname                    string
	VersionFrom                 string
	VersionTo                   string
	SyncIsSFDPComplianceEnabled bool
}

CommandTemplateData represents the data available for command template interpolation

type ExecOptions

type ExecOptions struct {
	CommandIndex int
	Disabled     bool
	AllowFailure bool
	Cmd          string
	Args         []string
	Environment  map[string]string
	StreamOutput bool
}

func (*ExecOptions) EnvironmentSlice

func (o *ExecOptions) EnvironmentSlice() []string

EnvironmentSlice returns the environment variables as a slice of strings

Jump to

Keyboard shortcuts

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