observable

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Observable

type Observable interface {
	AddObserver(Observer) error
}

type ObservableImpl

type ObservableImpl struct {

	// Observers is a list of all Observers that are currently connected
	// for now these are just the GRPC stream corresponding to the AddObserver call
	Observers []Observer
	// contains filtered or unexported fields
}

ObservableImpl provides a base implementation of the Observable interface it should be embedded in all tailpipe plugin, collection and source implementations (via collection.RowSourceImpl, source.RowSourceImpl and plugin.RowSourceImpl)

func (*ObservableImpl) AddObserver

func (p *ObservableImpl) AddObserver(o Observer) error

func (*ObservableImpl) NotifyError

func (p *ObservableImpl) NotifyError(ctx context.Context, executionId string, err error)

func (*ObservableImpl) NotifyObservers

func (p *ObservableImpl) NotifyObservers(ctx context.Context, e events.Event) error

type Observer

type Observer interface {
	Notify(context.Context, events.Event) error
}

Observer is the interface that all observers must implement

Jump to

Keyboard shortcuts

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