poller

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	GitClient  gitclient.Interface
	RepoClient repo.Interface
	Launcher   launcher.Interface

	// CommandRunner used to run git commands if no GitClient provided
	CommandRunner cmdrunner.CommandRunner

	// KubeClient is used to lazy create the repo client and launcher
	KubeClient kubernetes.Interface

	// Dir is the work directory. If not specified a temporary directory is created on startup.
	Dir string `env:"WORK_DIR"`

	// Namespace the namespace polled for `Secret` resources
	Namespace string `env:"NAMESPACE"`

	// GitBinary name of the git binary; defaults to `git`
	GitBinary string `env:"GIT_BINARY"`

	// PollDuration duration between polls
	PollDuration time.Duration `env:"POLL_DURATION"`

	// NoLoop disable the polling loop so that a single poll is performed only
	NoLoop bool `env:"NO_LOOP"`

	// NoResourceApply disable the applying of resources in a git repository at `.jx/git-operator/resources/*.yaml`
	NoResourceApply bool `env:"NO_RESOURCE_APPLY"`

	// Branch the branch to poll. If not specified defaults to the default branch from the clone
	Branch string `env:"BRANCH"`
}

Options the configuration options for the poller

func (*Options) Poll

func (o *Options) Poll() error

Poll polls the available repositories

func (*Options) Run

func (o *Options) Run() error

Run polls for git changes

func (*Options) ValidateOptions

func (o *Options) ValidateOptions() error

ValidateOptions validates the options and lazily creates any resources required

Jump to

Keyboard shortcuts

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