runtime

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package runtime はページで使用する交換可能なGo実行環境を定義する。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment struct {
	Document   *dom.Document
	Events     *events.Dispatcher
	BaseURL    *url.URL
	Fetch      func(context.Context, *network.Request) (*network.Response, error)
	OnMutation func()
	ConsoleLog func(message string)
}

Environment はRuntimeへ公開するページの状態を保持する。

type Factory

type Factory func() Runtime

Factory はページごとに独立したRuntimeを生成する。

type Runtime

type Runtime interface {
	Load(ctx context.Context, scripts []Script, environment Environment) error
	Start(ctx context.Context) error
	Stop() error
}

Runtime は1ページに属するGoスクリプトを実行する。

type Script

type Script struct {
	SourceURL *url.URL
	Source    string
	Inline    bool
}

Script は文書内で見つかった1つのGoソースを表す。

Directories

Path Synopsis
Package yaegi はYaegiを使ったGrowseページのRuntimeを実装する。
Package yaegi はYaegiを使ったGrowseページのRuntimeを実装する。

Jump to

Keyboard shortcuts

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