feed

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 8 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 feed owns bounded ephemeral conversation frames, never durable history.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hub

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

func New

func New(node protocol.NodeID) *Hub

func (*Hub) Delta

func (h *Hub) Delta(id protocol.SessionID, draft protocol.ConversationDraft) error

func (*Hub) Observed added in v0.2.3

func (h *Hub) Observed(id protocol.SessionID) bool

Observed includes reservations made before the initial history read completes.

func (*Hub) Publish

func (h *Hub) Publish(id protocol.SessionID, change protocol.ConversationChange)

Publish accepts a committed change. Delta uses its separate bounded path.

func (*Hub) PublishBackground added in v0.2.4

func (h *Hub) PublishBackground(id protocol.SessionID, tasks []protocol.ConversationBackgroundTask)

PublishBackground retains deduplication state only for the background task snapshot still published by the store. Older completions stay in history.

func (*Hub) Reserve

func (h *Hub) Reserve(id protocol.SessionID, closed <-chan struct{}) *Reserved

func (*Hub) Reset

func (h *Hub) Reset(id protocol.SessionID)

func (*Hub) Seal

func (h *Hub) Seal(id protocol.SessionID, turn protocol.TurnID)

func (*Hub) Sequence

func (h *Hub) Sequence(id protocol.SessionID) uint64

func (*Hub) Sessions

func (h *Hub) Sessions() []protocol.SessionID

Sessions returns only currently retained or observed conversation feeds.

type Reserved

type Reserved struct {
	Sequence uint64
	Drafts   []protocol.ConversationDraft
	// contains filtered or unexported fields
}

Reserved registers before the history read, so concurrent committed frames cannot fall between the initial snapshot and live observation.

func (*Reserved) Close

func (r *Reserved) Close() error

func (*Reserved) Subscribe

func (r *Reserved) Subscribe(snapshot protocol.ConversationSnapshot) link.Subscription

Subscribe receives a history page already fitted with room for these drafts.

type Subscription

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

func (*Subscription) Close

func (s *Subscription) Close() error

func (*Subscription) Next

func (s *Subscription) Next(ctx context.Context) (protocol.Update, error)

Jump to

Keyboard shortcuts

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