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

kernelin

package
v1.49.13 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Cap         = "kernel-in"
	Kind        = "kernel"
	DefaultPort = 80
	SpareFirst  = 17180
	SpareLast   = 17189
	CDPPort     = 9222
	HeadLimit   = 64 * 1024
	HeadTimeout = 30 * time.Second
	OpenTimeout = 10 * time.Second
	BindHost    = "127.0.0.1"
	WildHost    = "0.0.0.0"
)

Variables

This section is empty.

Functions

func Announce added in v1.47.0

func Announce(port int) func(*link.Hello)

func KernelPort

func KernelPort(host string, listenPort int) (int, bool)

func Pick added in v1.47.0

func Pick(port int, status func(format string, args ...any)) int

func Reason

func Reason(s string) string

func URL

func URL(kernelPort string, listenPort int) string

Types

type Config

type Config struct {
	Port        int
	HeadTimeout time.Duration
	OpenTimeout time.Duration
	Logf        func(format string, args ...any)
	Status      func(format string, args ...any)
}
type Head struct {
	Method string
	Host   string
}

func ParseHead

func ParseHead(head []byte) (Head, bool)

type Open

type Open struct {
	Kind string `json:"kind"`
	Port int    `json:"port"`
}

type Service

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

func New

func New(cfg Config) *Service

func (*Service) Add

func (s *Service) Add(l *link.Link)

func (*Service) Addr

func (s *Service) Addr() net.Addr

func (*Service) Close

func (s *Service) Close() error
func (s *Service) Links() int

func (*Service) Listen

func (s *Service) Listen() error

Jump to

Keyboard shortcuts

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