feature

package
v1.80.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package feature tracks which features are linked into the binary.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string)

Register notes that the named feature is linked into the binary.

Types

type Hook

type Hook[Func any] struct {
	// contains filtered or unexported fields
}

Hook is a func that can only be set once.

It is not safe for concurrent use.

func (*Hook[Func]) Get

func (h *Hook[Func]) Get() Func

Get returns the hook function, or panics if it hasn't been set. Use IsSet to check if it's been set.

func (*Hook[Func]) IsSet

func (h *Hook[Func]) IsSet() bool

IsSet reports whether the hook has been set.

func (*Hook[Func]) Set

func (h *Hook[Func]) Set(f Func)

Set sets the hook function, panicking if it's already been set or f is the zero value.

It's meant to be called in init.

Directories

Path Synopsis
Package capture formats packet logging into a debug pcap stream.
Package capture formats packet logging into a debug pcap stream.
dissector
Package dissector contains the Lua dissector for Tailscale packets.
Package dissector contains the Lua dissector for Tailscale packets.
The condregister package registers all conditional features guarded by build tags.
The condregister package registers all conditional features guarded by build tags.
Package tap registers Tailscale's experimental (demo) Linux TAP (Layer 2) support.
Package tap registers Tailscale's experimental (demo) Linux TAP (Layer 2) support.
Package wakeonlan registers the Wake-on-LAN feature.
Package wakeonlan registers the Wake-on-LAN feature.

Jump to

Keyboard shortcuts

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