noop

package
v0.1.1-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Serves as a template for new segments and forwards flows, otherwise does nothing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NoOp

type NoOp struct {
	segments.BaseSegment // always embed this, no need to repeat I/O chan code

}

The NoOp Segment is considered a template for any additional Segments, as it showcases the exact implementation.

func (NoOp) New

func (segment NoOp) New(config map[string]string) segments.Segment

Every Segment must implement a New method, even if there isn't any config it is interested in.

func (*NoOp) Run

func (segment *NoOp) Run(wg *sync.WaitGroup)

The main goroutine of any Segment. Any Run method must: 1. close(segment.Out) when done, usually when segment.In is closed by the previous segment or the Pipeline itself. 2. call wg.Done() before exiting

Jump to

Keyboard shortcuts

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