Versions in this module Expand all Collapse all v0 v0.3.0 Jan 2, 2024 Changes in this version + var ErrHostModuleInit = errors.New("cannot instantiate the host module") + var ErrPACEvaluation = errors.New("cannot evaluate the PAC script") + var ErrPACModuleInit = errors.New("cannot instantiate the PAC module") + var ErrURLParse = errors.New("cannot parse url") + var ErrWASIModuleInit = errors.New("cannot instantiate the WASI module") + func DNSResolver(host string) (string, error) + func MyIPAddr() (string, error) + func Nanosleep(ns int64) + func Nanotime() int64 + func Walltime() (sec int64, nsec int32) + type DNSResolverFn func(host string) (ip string, err error) + type Evaluator struct + DNSResolver DNSResolverFn + Logger *slog.Logger + MyIPAddr MyIPAddrFn + Nanosleep sys.Nanosleep + Nanotime sys.Nanotime + NanotimeResolution sys.ClockResolution + RandSource io.Reader + Walltime sys.Walltime + WalltimeResolution sys.ClockResolution + func New() *Evaluator + func (e *Evaluator) EvalPAC(ctx context.Context, pacScript, urlStr string) (res string, err error) + type MyIPAddrFn func() (ip string, err error) v0.2.0 Dec 29, 2023 Changes in this version + var WASMModuleData []byte v0.1.0 Dec 28, 2023 Changes in this version + func EvalPAC(ctx context.Context, script, url string) (string, error)