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 Context ¶
type Context struct {
Globals scope.ScopedBindings
Funcs *scope.FuncTable
DefaultHost string
HostAliasing HostAliasFn
Client *http.Client
}
func NewContext ¶
func NewContext() *Context
func NewDefaultContext ¶
NewDefaultContext returns a default setup of Context, binding standard funcs, loading config, etc.
type HostAliasFn ¶
HostAliasFn applies host aliasing rules, returning a new hostname (or the same hostname if no aliasing is applied).
func ComposeHostAliasing ¶
func ComposeHostAliasing(base, next HostAliasFn) HostAliasFn
type SimpleHostAliases ¶
func (SimpleHostAliases) GetAlias ¶
func (sha SimpleHostAliases) GetAlias(hostname string) string
Click to show internal directories.
Click to hide internal directories.