runtime

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupported = errors.New(protocol.ErrUnsupported)

Functions

This section is empty.

Types

type Client

type Client interface {
	Spec() PluginSpec
	Handshake() protocol.Handshake
	SupportsOp(op string) bool
	Call(ctx context.Context, op string, input any, output any) error
	StartStream(ctx context.Context, op string, input any) (streamID string, events <-chan protocol.Event, err error)
	Close(ctx context.Context) error
}

type Factory

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

func NewFactory

func NewFactory(opts FactoryOptions) *Factory

func (*Factory) Start

func (f *Factory) Start(ctx context.Context, spec PluginSpec, opts StartOptions) (Client, error)

type FactoryOptions

type FactoryOptions struct {
	HandshakeTimeout time.Duration
	ShutdownTimeout  time.Duration
}

type OpError

type OpError struct {
	PluginID string
	Op       string
	Code     string
	Message  string
	Details  map[string]any
}

func (*OpError) Error

func (e *OpError) Error() string

func (*OpError) Is

func (e *OpError) Is(target error) bool

type PluginSpec

type PluginSpec struct {
	ID       string
	Path     string
	Args     []string
	Env      map[string]string
	WorkDir  string
	Priority int
}

type RequestMeta

type RequestMeta struct {
	RepoRoot string
	Cwd      string
	DryRun   bool
}

type StartOptions

type StartOptions struct {
	Meta RequestMeta
}

Jump to

Keyboard shortcuts

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