localdev

package
v1.0.0-rc07 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterContext

type ClusterContext struct {
	Identifier   string
	ClusterName  string
	Organization string
	Config       *v2.Config
	Paths        *paths.ClusterPaths
}

ClusterContext contains the resolved config and filesystem paths for a cluster.

type ClusterResolver

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

ClusterResolver resolves cluster identifiers to canonical config and path state.

func NewClusterResolver

func NewClusterResolver() (*ClusterResolver, error)

NewClusterResolver returns a resolver backed by the shared config directories.

func (*ClusterResolver) Resolve

func (r *ClusterResolver) Resolve(ctx context.Context, identifier string) (*ClusterContext, error)

Resolve loads a cluster config and resolves its organization-aware paths.

type DefaultExecutor

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

DefaultExecutor delegates to the shared command runner.

func NewExecutor

func NewExecutor() *DefaultExecutor

NewExecutor returns an executor backed by the process-wide command runner.

func (*DefaultExecutor) Run

func (e *DefaultExecutor) Run(ctx context.Context, opts RunOptions) ([]byte, error)

Run executes a command and returns captured stdout/stderr.

func (*DefaultExecutor) RunStreaming

func (e *DefaultExecutor) RunStreaming(ctx context.Context, opts RunOptions) error

RunStreaming executes a command while streaming stdout/stderr to the caller.

type Executor

type Executor interface {
	Run(ctx context.Context, opts RunOptions) ([]byte, error)
	RunStreaming(ctx context.Context, opts RunOptions) error
}

Executor runs sanitized external commands.

type Layout

type Layout struct {
	Root           string
	GiteaDataDir   string
	GiteaConfDir   string
	GiteaCertDir   string
	TokensDir      string
	MetadataPath   string
	AppIniPath     string
	CACertPath     string
	ServerCertPath string
	ServerKeyPath  string
	AdminTokenPath string
	UserTokenPath  string
}

Layout describes the local-dev plugin state directory.

func ResolveLayout

func ResolveLayout(root string) (Layout, error)

ResolveLayout returns the absolute state layout for the plugin. When root is empty the layout defaults to <OPENCENTER_CONFIG_DIR>/local, keeping all state inside the standard configuration tree instead of creating a dot-directory in the working directory.

func (Layout) Ensure

func (l Layout) Ensure() error

Ensure creates the state directory structure.

type RunOptions

type RunOptions struct {
	Dir    string
	Env    map[string]string
	Name   string
	Args   []string
	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer
}

RunOptions describes a single external command invocation.

Directories

Path Synopsis
api
Package rustfs manages the disposable RustFS instance used by local Kind development.
Package rustfs manages the disposable RustFS instance used by local Kind development.

Jump to

Keyboard shortcuts

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