homeplugins

package
v7.2.42 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarkLoadResults added in v7.2.32

func MarkLoadResults(report *SyncReport, inspector PluginLoadInspector) error

func Sync

func Sync(ctx context.Context, cfg *config.Config, pluginRuntime PluginRuntime) error

func SyncPlatform

func SyncPlatform(ctx context.Context, cfg *config.Config, pluginRuntime PluginRuntime, platform Platform) error

Types

type Platform

type Platform struct {
	GOOS    string `json:"goos"`
	GOARCH  string `json:"goarch"`
	Variant string `json:"variant,omitempty"`
}

func CurrentPlatform

func CurrentPlatform() Platform

CurrentPlatform reports the platform used by pluginhost discovery.

func NormalizePlatform

func NormalizePlatform(platform Platform) Platform

type PluginInstallStatus added in v7.2.32

type PluginInstallStatus struct {
	ID            string `json:"id"`
	Version       string `json:"version,omitempty"`
	ReleaseTag    string `json:"release_tag,omitempty"`
	Repository    string `json:"repository,omitempty"`
	InstallStatus string `json:"install_status"`
	LoadStatus    string `json:"load_status,omitempty"`
	Path          string `json:"path,omitempty"`
	Skipped       bool   `json:"skipped,omitempty"`
	Overwritten   bool   `json:"overwritten,omitempty"`
	Error         string `json:"error,omitempty"`
}

type PluginLoadInspector added in v7.2.32

type PluginLoadInspector interface {
	PluginRegistered(id string) bool
}

type PluginRuntime

type PluginRuntime interface {
	PluginBusy(id string) bool
	UnloadPlugin(id string) bool
}

type SyncReport added in v7.2.32

type SyncReport struct {
	SchemaVersion int                   `json:"schema_version"`
	TaskID        uint                  `json:"task_id,omitempty"`
	Task          string                `json:"task"`
	NodeID        string                `json:"node_id,omitempty"`
	Status        string                `json:"status"`
	Phase         string                `json:"phase"`
	OK            bool                  `json:"ok"`
	StartedAt     time.Time             `json:"started_at"`
	FinishedAt    time.Time             `json:"finished_at,omitempty"`
	UpdatedAt     time.Time             `json:"updated_at"`
	Platform      Platform              `json:"platform"`
	Plugins       []PluginInstallStatus `json:"plugins"`
	Error         string                `json:"error,omitempty"`
}

func DeleteWithReport added in v7.2.32

func DeleteWithReport(ctx context.Context, cfg *config.Config, pluginRuntime PluginRuntime, taskID uint, pluginID string) SyncReport

func SyncPlatformWithReport added in v7.2.32

func SyncPlatformWithReport(ctx context.Context, cfg *config.Config, pluginRuntime PluginRuntime, platform Platform) (SyncReport, error)

func SyncWithReport added in v7.2.32

func SyncWithReport(ctx context.Context, cfg *config.Config, pluginRuntime PluginRuntime) (SyncReport, error)

Jump to

Keyboard shortcuts

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