exutil

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package exutil holds the few lines every example repeats.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, c *packtrail.Client, flow string, input any) *packtrail.State

Run starts flow and waits for the final state.

Types

type Group

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

Group runs an engine and workers and stops them together: Stop cancels them and waits until they drained, so the connection can be closed after.

func NewGroup

func NewGroup(ctx context.Context) *Group

NewGroup returns a group whose members run until Stop (or ctx ends).

func (*Group) Engine

func (g *Group) Engine(nc *nats.Conn, opts ...packtrail.Option) *packtrail.Engine

Engine creates and runs an engine, and returns once it is ready: the namespace is provisioned and its consumers (cron and triggers included) are pulling.

func (*Group) Serve

func (g *Group) Serve(nc *nats.Conn, ns, kind string, h worker.Handler, opts ...worker.Option)

Serve runs a worker for kind.

func (*Group) Stop

func (g *Group) Stop()

Stop cancels every member and waits for them.

Jump to

Keyboard shortcuts

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