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: 0

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