Help us shape the future of Go! Take the 2026 Go Developer Survey

cdp

package
v1.44.3 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Kind         = "cdp"
	Cap          = "cdp"
	UpdateKind   = "browsers"
	UpdateCap    = "browsers"
	MaxMessage   = 64 << 20
	DialTimeout  = 10 * time.Second
	ProbeTimeout = 5 * time.Second
)
View Source
const (
	ExtraHold = 2 * time.Second
)
View Source
const HistoryTimeout = 10 * time.Second
View Source
const HoldTimeout = 10 * time.Second
View Source
const (
	LostGrace = 2 * time.Second
)
View Source
const (
	NavTimeout = 60 * time.Second
)
View Source
const UpdateTimeout = 10 * time.Second

Variables

View Source
var ErrUnknown = errors.New("no such browser")

Functions

func Register

func Register(n *node.Node, r *Registry)

Types

type Open

type Open struct {
	Kind    string `json:"kind"`
	Browser string `json:"browser"`
}

type Opened

type Opened struct {
	Product         string `json:"product"`
	ProtocolVersion string `json:"protocolVersion"`
}

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

func NewRegistry

func NewRegistry(logf func(format string, args ...any)) *Registry

func (*Registry) Add

func (r *Registry) Add(ctx context.Context, raw string, seven bool) (link.Browser, error)

func (*Registry) Attach

func (r *Registry) Attach(l *link.Link)

func (*Registry) Handler

func (r *Registry) Handler() link.Handler

func (*Registry) Len

func (r *Registry) Len() int

func (*Registry) List

func (r *Registry) List() []link.Browser

func (*Registry) OnAdd added in v1.17.2

func (r *Registry) OnAdd(fn func(ctx context.Context, id string, hostports []string))

func (*Registry) OnCheck added in v1.17.3

func (r *Registry) OnCheck(fn func(ctx context.Context, id string, hostports []string))

func (*Registry) Protect added in v1.31.0

func (r *Registry) Protect(origins []string) error

func (*Registry) Remove

func (r *Registry) Remove(id string) bool

func (*Registry) Watch

func (r *Registry) Watch(ctx context.Context, every time.Duration)

Jump to

Keyboard shortcuts

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