sync_commands

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 10 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"`
	InheritEnvironment bool              `koanf:"inherit_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
	CommandsCount               int
	ValidatorClient             string
	ValidatorRPCURL             string
	ValidatorRole               string
	ValidatorRoleIsPassive      bool
	ValidatorRoleIsActive       bool
	ValidatorIdentityPublicKey  string
	ClusterName                 string
	VersionFrom                 string
	VersionTo                   string
	VersionToTag                string // full original tag from upstream repo, e.g. "v4.0.0-beta.2-jito"
	SyncIsSFDPComplianceEnabled bool
}

CommandTemplateData represents the data available for command template interpolation

type ExecOptions

type ExecOptions struct {
	ExecLogger         *log.Logger
	CommandIndex       int
	CommandsCount      int
	Disabled           bool
	AllowFailure       bool
	Cmd                string
	Args               []string
	Environment        map[string]string
	InheritEnvironment bool
	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