events

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 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

Overview

Package events carries what happens to workspaces to whoever watches: a workspace made, changed, published, refused or removed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bus

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

Bus hands each event to every watcher of its workspace.

func NewBus

func NewBus() *Bus

NewBus returns a bus no one watches yet.

func (*Bus) Stop

func (bus *Bus) Stop(watcher *Watcher)

Stop ends a watch.

func (*Bus) Tell

func (bus *Bus) Tell(event *gitdv1.WatchResponse)

Tell hands an event to every watcher of its workspace, stamped with the time now. A watcher too far behind is dropped, its events closed.

func (*Bus) Watch

func (bus *Bus) Watch(paths []string) *Watcher

Watch starts a watch of the workspaces at paths, or of every one.

func (*Bus) Watched

func (bus *Bus) Watched() bool

Watched says whether anyone watches, so that what costs to notice is noticed only then.

type Watcher

type Watcher struct {
	Events chan *gitdv1.WatchResponse
	// contains filtered or unexported fields
}

Watcher is one watch: its events, and the workspaces it watches (every one when none).

Jump to

Keyboard shortcuts

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