runs

package
v0.0.0-...-f96b470 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package runs initialises the runs event stream consumer and producer.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownConsumerType = fmt.Errorf("unknown consumer type")

ErrUnknownConsumerType is returned when the consumer type is unknown.

Functions

func NewProducerConsumer

func NewProducerConsumer(runProcessor Processor, opts ...Opts) (events.Producer[uuid.UUID], events.Consumer, error)

NewProducerConsumer creates a new producer and consumer.

Types

type ConsumerType

type ConsumerType string

ConsumerType represents the consumer type.

const (
	ConsumerTypeLocal ConsumerType = "local"
)

Different consumer types.

type Options

type Options struct {
	ConsumerType ConsumerType
}

Options represents the options.

type Opts

type Opts func(*Options)

Opts represents a function that modifies the options.

type Processor

type Processor interface {
	// Process processes a run.
	Process(runID uuid.UUID) (uuid.UUID, error)
}

Processor processes runs.

func NewProcessor

func NewProcessor(completionsProducer events.Producer[uuid.UUID], scenarioRepository repository.Scenario, runRepository repository.Run) Processor

NewProcessor creates a new run processor.

Jump to

Keyboard shortcuts

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