debugstar

package
v2.9.4 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package debugstar lets parts of the debug dump machinery be used by Starlark scripts. It's a separate package to avoid linking the debug server into pachctl for local execution.

Index

Constants

This section is empty.

Variables

View Source
var BuiltinScripts = map[string]string{}

BuiltinScripts are the scripts loaded from starlark/.

Functions

This section is empty.

Types

type DumpFS

type DumpFS interface {
	Write(string, func(io.Writer) error) error
}

DumpFS is the part of debug/server.DumpFS that we care about. This interface breaks a cycle between this package and the debug/server package.

type Env

type Env struct {
	FS                  DumpFS
	Kubernetes          kubernetes.Interface
	KubernetesDynamic   dynamic.Interface
	KubernetesNamespace string
}

Env is the parts of the debug dump service available to Starlark scripts.

func (*Env) Options

func (e *Env) Options() (ourstar.Options, error)

Options returns the starlark options for this environment.

func (*Env) RunStarlark

func (e *Env) RunStarlark(rctx context.Context, name string, script string) (retErr error)

RunStarlark executes the provided script.

type InteractiveDumpFS

type InteractiveDumpFS struct {
	Base string
	// contains filtered or unexported fields
}

InteractiveDumpFS is the dump FS used for manual invocations of dump scripts with starpach. It writes to a temporary directory.

func (*InteractiveDumpFS) Write

func (fs *InteractiveDumpFS) Write(filename string, f func(w io.Writer) error) (retErr error)

type LocalDumpFS

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

LocalDumpFS is the dump FS used for `pachctl debug dump --local` invocations. It writes to a tgz file in the current directory.

func (*LocalDumpFS) Close

func (fs *LocalDumpFS) Close() (retErr error)

func (*LocalDumpFS) Name

func (fs *LocalDumpFS) Name() string

Name returns the name of the file created for the archive; printed by pachctl.

func (*LocalDumpFS) Write

func (fs *LocalDumpFS) Write(filename string, f func(io.Writer) error) error

Jump to

Keyboard shortcuts

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