runtime

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 9 Imported by: 20

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissedParam = errors.New("missed value for parameter(s)")
)

Functions

This section is empty.

Types

type Option

type Option func(*Options)

func WithLog

func WithLog(writer io.Writer) Option

func WithLogFields added in v0.8.2

func WithLogFields(fields map[string]interface{}) Option

func WithLogLevel

func WithLogLevel(lvl logging.Level) Option

func WithParam

func WithParam(name string, value interface{}) Option

func WithParams

func WithParams(params map[string]interface{}) Option

type Options

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

func NewOptions added in v0.4.0

func NewOptions(setters []Option) *Options

func (*Options) WithContext added in v0.4.0

func (opts *Options) WithContext(parent context.Context) context.Context

type Program

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

func NewProgram

func NewProgram(src string, body core.Expression, params map[string]struct{}) (*Program, error)

func (*Program) MustRun

func (p *Program) MustRun(ctx context.Context, setters ...Option) []byte

func (*Program) Params added in v0.10.0

func (p *Program) Params() []string

func (*Program) Run

func (p *Program) Run(ctx context.Context, setters ...Option) (result []byte, err error)

func (*Program) Source

func (p *Program) Source() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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