context

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppName      = "flow"
	HeaderCtxKey = "ctx"
)

Variables

This section is empty.

Functions

func ExpandRef

func ExpandRef(ctx *Context, ref executable.Ref) executable.Ref

Types

type Context

type Context struct {
	Ctx              context.Context
	CancelFunc       context.CancelFunc
	Logger           io.Logger
	Config           *config.Config
	CurrentWorkspace *workspace.Workspace
	TUIContainer     *tuikit.Container
	WorkspacesCache  cache.WorkspaceCache
	ExecutableCache  cache.ExecutableCache

	// ProcessTmpDir is the temporary directory for the current process. If set, it will be
	// used to store temporary files all executable runs when the tmpDir value is specified.
	ProcessTmpDir string
	// contains filtered or unexported fields
}

func NewContext

func NewContext(ctx context.Context, stdIn, stdOut *os.File) *Context

func (*Context) Finalize

func (ctx *Context) Finalize()

func (*Context) SetIO

func (ctx *Context) SetIO(stdIn, stdOut *os.File)

SetIO sets the standard input and output for the context This function should NOT be used outside of tests! The standard input and output should be set when creating the context.

func (*Context) SetView

func (ctx *Context) SetView(view tuikit.View) error

func (*Context) StdIn

func (ctx *Context) StdIn() *os.File

func (*Context) StdOut

func (ctx *Context) StdOut() *os.File

func (*Context) String

func (ctx *Context) String() string

Jump to

Keyboard shortcuts

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