goccia

package module
v0.15.5 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

README

goccia

Documentation

Overview

Package goccia provides the main entrypoint for the goccia library.

Index

Constants

View Source
const (
	// StageRunningModeSingle enforces a single-threaded running mode.
	StageRunningModeSingle = config.StageRunningModeSingle
	// StageRunningModePool enforces a multi-threaded running mode (worker pool).
	StageRunningModePool = config.StageRunningModePool
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

type Connector[T any] = connector.Connector[T]

Connector represents the interface for a generic connector to be used for connecting the stages.

type MessageEnvelope added in v0.15.3

type MessageEnvelope[T message.Body] = message.Message[T]

MessageEnvelope is an untyped alias for a generic message envelope.

func NewMessageEnvelope added in v0.15.3

func NewMessageEnvelope[T message.Body](body T) *MessageEnvelope[T]

NewMessageEnvelope returns a new message envelope.

type Pipeline

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

Pipeline represents a generic pipeline. It is the entrypoint for the stages.

func NewPipeline

func NewPipeline() *Pipeline

NewPipeline returns a new pipeline.

func (*Pipeline) AddStage

func (p *Pipeline) AddStage(stage Stage)

AddStage adds a stage to the pipeline. The order of the stages is important.

func (*Pipeline) Close

func (p *Pipeline) Close()

Close closes all the stages. It blocks until all the stages are closed.

func (*Pipeline) Init

func (p *Pipeline) Init(ctx context.Context) error

Init initializes all the stages.

func (*Pipeline) Run

func (p *Pipeline) Run(ctx context.Context)

Run runs all the stages. It will spawn a goroutine for each stage.

type Stage

type Stage interface {
	// Init initializes the stage.
	Init(ctx context.Context) error
	// Run runs the stage.
	Run(ctx context.Context)
	// Close closes (forever) the stage.
	Close()
}

Stage defines the interface for a generic stage.

type StageConfig added in v0.9.0

type StageConfig = config.Stage

StageConfig represents the configuration for a stage.

type StageRunningMode

type StageRunningMode = config.StageRunningMode

StageRunningMode represents the running mode of a stage.

Directories

Path Synopsis
Package connector contains the connector implementations offered by goccia.
Package connector contains the connector implementations offered by goccia.
Package egress contains the egress stages.
Package egress contains the egress stages.
examples
can/client command
can/server command
csv command
ebpf command
file command
kafka/consumer command
kafka/producer command
telemetry
Package telemetry provides OpenTelemetry initialization for the examples.
Package telemetry provides OpenTelemetry initialization for the examples.
Package ingress contains the ingress stages.
Package ingress contains the ingress stages.
config
Package config contains utility structs/functions and types for validating the configurations across the library.
Package config contains utility structs/functions and types for validating the configurations across the library.
message
Package message contains the structures and interfaces for messages.
Package message contains the structures and interfaces for messages.
pool
Package pool contains the structs used by the worker pools across the library.
Package pool contains the structs used by the worker pools across the library.
rb
Package rb provides a lock-free spsc/mpmc generic ring buffer.
Package rb provides a lock-free spsc/mpmc generic ring buffer.
rob
Package rob implements a re-order buffer.
Package rob implements a re-order buffer.
Package processor contains the processor stages.
Package processor contains the processor stages.

Jump to

Keyboard shortcuts

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