buffered

package
v0.0.0-...-3bfe646 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Overview

package buffered implements an event dispatcher with buffering semantics

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dispatcher

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

Dispatcher is a buffering progress event dispatcher. It will buffer events if the receiving side is slow or unavailable until it has reconnected.

func New

func New() *Dispatcher

New creates an event dispatcher with internal message buffer to collect messages that it failed to send to the client. The messages are resent whenever the client reconnects.

func (*Dispatcher) Chan

func (r *Dispatcher) Chan() <-chan *installpb.ProgressResponse

Chan returns the channel that receives events

func (*Dispatcher) Close

func (r *Dispatcher) Close()

Close stops the dispatcher internal processes Implements EventDispatcher

func (*Dispatcher) Send

func (r *Dispatcher) Send(event dispatcher.Event)

Send publishes the specified event. Implements EventDispatcher

Jump to

Keyboard shortcuts

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