msgingest

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gateway

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

Gateway receives raw platform messages, deduplicates, debounces, and emits IngestedMessages.

func New

func New(msgStore MessageStore, debounce time.Duration) *Gateway

New constructs a Gateway.

func (*Gateway) Dispatch

func (g *Gateway) Dispatch(msg platform.InboundMessage)

Dispatch is called by a platform receiver for each inbound message. All seen-map and debounce-state mutations are protected by g.mu.

func (*Gateway) Out

func (g *Gateway) Out() <-chan IngestedMessage

Out returns the channel of outgoing IngestedMessages.

func (*Gateway) Run

func (g *Gateway) Run(ctx context.Context)

Run blocks until ctx is cancelled, then closes Out().

type IngestedMessage

type IngestedMessage struct {
	MsgID      string
	SessionKey string
	Platform   string
	Content    string
	ReplyTo    platform.InboundMessage
}

IngestedMessage is a deduplicated, debounced, normalized message ready for routing.

type MessageStore

type MessageStore interface {
	CreateBatch(ctx context.Context, msgs []store.BatchMsg) (int64, error)
}

MessageStore is the subset of store.MessageStore used by msgingest.

Jump to

Keyboard shortcuts

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