kobject

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package kobject implements Linux kernel kobject uvent watcher.

Index

Constants

View Source
const (
	ActionAdd     = kobject.Add
	ActionRemove  = kobject.Remove
	ActionChange  = kobject.Change
	ActionMove    = kobject.Move
	ActionOnline  = kobject.Online
	ActionOffline = kobject.Offline
	ActionBind    = kobject.Bind
	ActionUnbind  = kobject.Unbind
)

Re-export action constants.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event = kobject.Event

Event is exported.

type Watcher

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

Watcher is a kobject uvent watcher.

func NewWatcher

func NewWatcher() (*Watcher, error)

NewWatcher creates a new kobject watcher.

func (*Watcher) Close

func (w *Watcher) Close() error

Close the watcher.

func (*Watcher) Run

func (w *Watcher) Run(logger *zap.Logger) <-chan *Event

Run the watcher, returns the channel of events.

Jump to

Keyboard shortcuts

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