reader

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2020 License: Apache-2.0 Imports: 7 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

func NewRedisReader

func NewRedisReader(pubsub *redis.PubSub) EventReader

func NewTopologyReader

func NewTopologyReader(t *topology.Topology) EventReader

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.

type RedisReader

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

RedisReader reads events from a redis client PubSub, And outputs as a event.Trace record into its backlog.

func (RedisReader) Read

func (r RedisReader) Read() chan interface{}

func (*RedisReader) Run

func (r *RedisReader) Run(ctx context.Context) error

type TopologyReader

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

func (*TopologyReader) Read

func (t *TopologyReader) Read() chan interface{}

func (*TopologyReader) Run

func (t *TopologyReader) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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