reader

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmptyReader

type EmptyReader struct{}

func (*EmptyReader) Read

func (e *EmptyReader) Read() chan interface{}

func (*EmptyReader) Run

func (e *EmptyReader) Run(ctx context.Context) error

type EventReader

type EventReader interface {
	Read() chan interface{}
	Run(ctx context.Context) error
}

func NewEventReader

func NewEventReader(src interface{}) EventReader

NewEventReader attempts to create an EventReader of a known type Currently only knows: *kernel.Probe, *redis.PubSub

func NewKernelReader

func NewKernelReader(probe *kernel.Probe) EventReader

NewKernelReader creates a kernel event reader from a `kernel.Probe` context

type KernelReader

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

KernelReader handles callbacks from the kernel and implements a higher level channel-based emission to clients

func (*KernelReader) Read

func (k *KernelReader) Read() chan interface{}

Read returns the channel of processed events.

func (*KernelReader) Run

func (k *KernelReader) Run(ctx context.Context) error

Run starts up the kernel reader in its own goroutine, then simply reads the raw messages in, and pipes them to the KernelEvent channel.

Jump to

Keyboard shortcuts

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