interop

package
v0.0.0-...-ef469da Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Await

func Await(promiseLike js.Value) (js.Value, error)

func AwaitWithErrorMapping

func AwaitWithErrorMapping(promiseLike js.Value, errorFn func(js.Value) error) (js.Value, error)

func MapToString

func MapToString(vs []js.Value) []string

func NewDenoConn

func NewDenoConn(dialBackend DialBackend) func(ctx context.Context, network string, address string) (net.Conn, error)

func NewPromise

func NewPromise(executor func(_ func(interface{}), _ func(error))) js.Value

func NewUint8Array

func NewUint8Array(length int) js.Value

func ToSlice

func ToSlice(v js.Value) []js.Value

Types

type DialBackend

type DialBackend int
const (
	DenoDialBackend DialBackend = iota
	NodeDialBackend DialBackend = iota
)

func StringToDialBackend

func StringToDialBackend(str string) DialBackend

type DialFunc

type DialFunc func(ctx context.Context, network string, address string) (net.Conn, error)

Jump to

Keyboard shortcuts

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