install

package
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package install installs Privateer plugins — from grc.store (pulled and verified end-to-end) or from a local binary path.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromConfig added in v1.31.0

func FromConfig(ctx context.Context, w io.Writer) error

FromConfig installs every plugin referenced by the active config that is not already present in the local manifest. Each service's plugin field is the grc.store <namespace>/<plugin_id> coordinate (optionally pinned with an @<version>); missing plugins are resolved against grc.store and installed concurrently, bounded by maxConcurrentInstalls. The first failure cancels the remaining installs and is returned wrapped with its coordinate.

It is a no-op (returns nil) when no services are configured or every requested plugin is already installed. Per-plugin progress is buffered and flushed to w as a single block per plugin, so concurrent installs never interleave their output mid-line; the caller owns flushing w.

It reads the active config from the same viper state as the config getters, so the caller must have loaded config (e.g. the CLI's PersistentPreRun) before invoking it — otherwise no services are visible and it is a no-op.

func FromStore added in v1.31.0

func FromStore(ctx context.Context, w io.Writer, arg string) error

FromStore resolves a plugin DIRECTLY against grc.store (the single source of truth): parse the <ns>/<id>[@<version>] coordinate, confirm it exists via GET /v1/plugins/<ns>/<id>, resolve the version, then pull + verify + install. No legacy plugin-data registry, no GitHub fallback. Progress is written to w; the caller owns flushing w.

func Local added in v1.31.0

func Local(w io.Writer, binaryPath string) error

Local installs a plugin from a local binary path: it copies the binary into the SDK's binaries dir (atomically) and registers it in the manifest as local/<name> at version "local". Progress is written to w; the caller owns flushing w.

Types

This section is empty.

Jump to

Keyboard shortcuts

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