gatedcontext

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Package gatedcontext provides a processor that holds LLMContextFrame until a notifier signals release.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Processor

type Processor struct {
	*processors.BaseProcessor
	Notifier  *notifier.Notifier
	StartOpen bool
	// contains filtered or unexported fields
}

Processor holds the latest LLMContextFrame until Notify() is called on the notifier, then pushes it.

func New

func New(name string, n *notifier.Notifier, startOpen bool) *Processor

New returns a gated LLM context processor. When Notifier.Notify() is called, the last stored LLMContextFrame is pushed downstream.

func (*Processor) ProcessFrame

func (p *Processor) ProcessFrame(ctx context.Context, f frames.Frame, dir processors.Direction) error

ProcessFrame holds LLMContextFrame until notifier signals; other frames pass through.

func (*Processor) Setup

func (p *Processor) Setup(ctx context.Context) error

Setup starts the goroutine that waits on the notifier and pushes the stored frame.

Jump to

Keyboard shortcuts

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