runtime

package
v2.0.0-alpha.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binary

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

func NewBinary

func NewBinary(path string, params map[string]any) (*Binary, error)

func (*Binary) Run

func (rt *Binary) Run(ctx context.Context, query *source.Source, params map[string]any) ([]byte, error)

func (*Binary) Version

func (rt *Binary) Version(ctx context.Context) (string, error)

type Builtin

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

func NewBuiltin

func NewBuiltin(params map[string]any) (*Builtin, error)

func (*Builtin) Run

func (r *Builtin) Run(ctx context.Context, query *source.Source, params map[string]any) ([]byte, error)

func (*Builtin) Version

func (r *Builtin) Version(_ context.Context) (string, error)

type Func

type Func func(ctx context.Context, query *source.Source, params map[string]interface{}) ([]byte, error)

type FuncStruct

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

func (FuncStruct) Run

func (f FuncStruct) Run(ctx context.Context, query *source.Source, params map[string]interface{}) ([]byte, error)

func (FuncStruct) Version

func (f FuncStruct) Version(_ context.Context) (string, error)

type HTTPParams

type HTTPParams struct {
	Headers http.Header
	Path    string
	Cookies []http.Cookie
}

type Options

type Options struct {
	Type   string
	Params map[string]any
}

type Remote

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

func NewRemote

func NewRemote(u string, params map[string]interface{}) (*Remote, error)

func (*Remote) Run

func (rt *Remote) Run(ctx context.Context, query *source.Source, params map[string]interface{}) ([]byte, error)

func (*Remote) Version

func (rt *Remote) Version(ctx context.Context) (string, error)

type Runtime

type Runtime interface {
	Version(ctx context.Context) (string, error)

	Run(ctx context.Context, query *source.Source, params map[string]interface{}) ([]byte, error)
}

func AsFunc

func AsFunc(fn Func) Runtime

func New

func New(opts Options) (Runtime, error)

Jump to

Keyboard shortcuts

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