uevent

package
v0.0.0-...-0b75b2d Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReaderCloser

func NewReaderCloser() (io.ReadCloser, error)

NewReaderCloser returns an io.ReadCloser handle for uevent.

Types

type Handler

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

Handler represents a uevent handler.

func NewHandler

func NewHandler() (*Handler, error)

NewHandler returns a uevent handler.

func (*Handler) Close

func (h *Handler) Close() error

Close shuts down the uevent handler and closes the underlying netlink connection.

func (*Handler) Read

func (h *Handler) Read() (*Uevent, error)

Read blocks and returns the next uevent when available.

type ReaderCloser

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

ReaderCloser defines a uevent reader/closer. It is an io.ReaderCloser implementation.

func (*ReaderCloser) Close

func (r *ReaderCloser) Close() error

Close implements closing function for uevent.

func (*ReaderCloser) Read

func (r *ReaderCloser) Read(p []byte) (int, error)

Read implements reading function for uevent.

type Uevent

type Uevent struct {
	Header    string
	Action    string
	DevPath   string
	SubSystem string
	SeqNum    string
	DevName   string
}

Uevent represents a single uevent.

Jump to

Keyboard shortcuts

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