notifier

package
v0.0.0-...-522126a Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package notifier implements an FD notifier implementation over RPC.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier

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

Notifier holds all the state necessary to issue notifications when IO events occur in the observed FDs.

func NewRPCNotifier

func NewRPCNotifier(cn *conn.RPCConnection) (*Notifier, error)

NewRPCNotifier creates a new notifier object.

func (*Notifier) AddFD

func (n *Notifier) AddFD(fd uint32, queue *waiter.Queue) error

AddFD adds an FD to the list of observed FDs.

func (*Notifier) HasFD

func (n *Notifier) HasFD(fd uint32) bool

HasFD returns true if the FD is in the list of observed FDs.

This should only be used by tests to assert that FDs are correctly registered.

func (*Notifier) NonBlockingPoll

func (n *Notifier) NonBlockingPoll(fd uint32, mask waiter.EventMask) waiter.EventMask

NonBlockingPoll polls the given fd in non-blocking fashion. It is used just to query the FD's current state; this method will block on the RPC response although the syscall is non-blocking.

func (*Notifier) RemoveFD

func (n *Notifier) RemoveFD(fd uint32)

RemoveFD removes an FD from the list of observed FDs.

func (*Notifier) UpdateFD

func (n *Notifier) UpdateFD(fd uint32) error

UpdateFD updates the set of events the FD needs to be notified on.

Jump to

Keyboard shortcuts

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