hsruntime

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package hsruntime provides HTTPScript-specific program runtime context, such as config loading, cookie loading, etc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigInitFn added in v0.1.10

type ConfigInitFn func(cfg string) (string, error)

ConfigInitFn is a function that augments the default configuration

type Context

type Context struct {
	Globals scope.ScopedBindings
	Funcs   *scope.FuncTable

	ConfigInit   ConfigInitFn
	HostAliasing hostalias.HostAlias
	Client       *http.Client
}

func NewContext

func NewContext() *Context

func NewDefaultContext

func NewDefaultContext(opts Options) (ctx *Context, err error)

NewDefaultContext returns a default setup of Context, binding standard funcs, loading config, etc.

type Options

type Options struct {
	CookieSpecs []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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