circular

package
v0.0.0-...-f92ee09 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

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

Buffer is a ring-buffer holding the last N messages received.

func New

func New(size int) *Buffer

New creates a new ring buffer pipeline element.

func (*Buffer) AddNext

func (c *Buffer) AddNext(pe pipeline.Pipeline)

AddNext adds a Pipeline element after this pipeline element

func (*Buffer) GetContents

func (c *Buffer) GetContents() []*model.Message

GetContents returns the contents of the circular buffer

func (*Buffer) Next

func (c *Buffer) Next() pipeline.Pipeline

Next returns the next pipeline element

func (*Buffer) Publish

func (c *Buffer) Publish(m *model.Message) error

Publish adds a message to the ring buffer

Jump to

Keyboard shortcuts

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