inmem

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package inmem provides in-memory conversation storage. Use when the agent and worker run in the same process. For remote workers, use redis.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryConversation

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

func NewInMemoryConversation

func NewInMemoryConversation(options ...Option) *InMemoryConversation

func (*InMemoryConversation) AddMessage

func (c *InMemoryConversation) AddMessage(ctx context.Context, id string, msg interfaces.Message) error

func (*InMemoryConversation) Clear

func (c *InMemoryConversation) Clear(ctx context.Context, id string) error

func (*InMemoryConversation) IsDistributed

func (c *InMemoryConversation) IsDistributed() bool

func (*InMemoryConversation) ListMessages

type Option

type Option func(*InMemoryConversation)

func WithMaxSize

func WithMaxSize(size int) Option

WithMaxSize sets the maximum number of messages to store per conversation.

Jump to

Keyboard shortcuts

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