client

package
v1.0.1-rc.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRunnerClientUnimplemented = fmt.Errorf("method unimplemented")

Functions

func ApplyOptions

func ApplyOptions(rc Runner, opts ...RunnerOption) error

Types

type LocalRunner

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

func NewLocalRunner

func NewLocalRunner(opts ...RunnerOption) (*LocalRunner, error)

func (*LocalRunner) Cleanup

func (r *LocalRunner) Cleanup(ctx context.Context) error

func (*LocalRunner) DryRunBlock

func (r *LocalRunner) DryRunBlock(ctx context.Context, block *document.CodeBlock, w io.Writer, opts ...RunnerOption) error

func (*LocalRunner) RunBlock

func (r *LocalRunner) RunBlock(ctx context.Context, block *document.CodeBlock) error

type RemoteRunner

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

func NewRemoteRunner

func NewRemoteRunner(ctx context.Context, addr string, opts ...RunnerOption) (*RemoteRunner, error)

func (*RemoteRunner) Cleanup

func (r *RemoteRunner) Cleanup(ctx context.Context) error

func (*RemoteRunner) DryRunBlock

func (r *RemoteRunner) DryRunBlock(ctx context.Context, block *document.CodeBlock, w io.Writer, opts ...RunnerOption) error

func (*RemoteRunner) RunBlock

func (r *RemoteRunner) RunBlock(ctx context.Context, block *document.CodeBlock) error

type Runner

type Runner interface {
	RunBlock(ctx context.Context, block *document.CodeBlock) error
	DryRunBlock(ctx context.Context, block *document.CodeBlock, w io.Writer, opts ...RunnerOption) error
	Cleanup(ctx context.Context) error
	// contains filtered or unexported methods
}

type RunnerOption

type RunnerOption func(Runner) error

func WithCleanupSession added in v0.6.3

func WithCleanupSession(cleanup bool) RunnerOption

func WithDir

func WithDir(dir string) RunnerOption

func WithEnableBackgroundProcesses added in v1.0.1

func WithEnableBackgroundProcesses(disableBackground bool) RunnerOption

func WithInsecure added in v0.7.1

func WithInsecure(insecure bool) RunnerOption

func WithLogger

func WithLogger(logger *zap.Logger) RunnerOption

func WithSession

func WithSession(s *runner.Session) RunnerOption

func WithSessionID added in v0.6.3

func WithSessionID(id string) RunnerOption

func WithSessionStrategy added in v0.7.0

func WithSessionStrategy(strategy runnerv1.SessionStrategy) RunnerOption

func WithStderr

func WithStderr(stderr io.Writer) RunnerOption

func WithStdin

func WithStdin(stdin io.Reader) RunnerOption

func WithStdout

func WithStdout(stdout io.Writer) RunnerOption

func WithTLSDir added in v0.7.1

func WithTLSDir(tlsDir string) RunnerOption

func WithinShellMaybe

func WithinShellMaybe() RunnerOption

Jump to

Keyboard shortcuts

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