task

package
v2.3.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2025 License: AGPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AvailableVersionsCacheStructVersion = 20230117
)

Variables

This section is empty.

Functions

func IsBatchQueryCmd

func IsBatchQueryCmd(cmd *cobra.Command, cmdArgs []string) bool

func IsCheckCmd

func IsCheckCmd(cmd *cobra.Command) bool

func IsDashboardCmd

func IsDashboardCmd(cmd *cobra.Command) bool

func IsModCmd

func IsModCmd(cmd *cobra.Command) bool

func IsPluginManagerCmd

func IsPluginManagerCmd(cmd *cobra.Command) bool

func RunTasks

func RunTasks(ctx context.Context, cmd *cobra.Command, args []string, options ...TaskRunOption) chan struct{}

RunTasks runs all tasks asynchronously returns a channel which is closed once all tasks are finished or the provided context is cancelled

Types

type AvailableVersionCache

type AvailableVersionCache struct {
	StructVersion uint32                                     `json:"struct_version"`
	CliCache      *CLIVersionCheckResponse                   `json:"cli_version"`
	PluginCache   map[string]plugin.PluginVersionCheckReport `json:"plugin_version"`
}

type CLIVersionCheckResponse

type CLIVersionCheckResponse struct {
	NewVersion   string    `json:"latest_version,omitempty"` // `json:"current_version"`
	DownloadURL  string    `json:"download_url,omitempty"`   // `json:"download_url"`
	ChangelogURL string    `json:"html,omitempty"`           // `json:"changelog_url"`
	Alerts       []*string `json:"alerts,omitempty"`
}

type HookFn

type HookFn func(context.Context)

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

type TaskRunOption

type TaskRunOption func(o *taskRunConfig)

func WithPreHook

func WithPreHook(f HookFn) TaskRunOption

func WithUpdateCheck

func WithUpdateCheck(run bool) TaskRunOption

Jump to

Keyboard shortcuts

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