follow

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package follow pulls public histories into read-only local mirror rooms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checkpoint

type Checkpoint struct {
	Cursor      string    `json:"cursor"`
	Initialized bool      `json:"initialized"`
	Count       int       `json:"count"`
	LatestAt    time.Time `json:"latest_at,omitempty"`
}

type Manager

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

func New

func New(sink Sink) *Manager

func (*Manager) Apply

func (m *Manager) Apply(ctx context.Context, configs []protocol.Follow)

func (*Manager) Close

func (m *Manager) Close()

func (*Manager) Status

func (m *Manager) Status() []protocol.FollowStatus

type Sink

type Sink interface {
	EnsureFollowRoom(context.Context, protocol.Follow, protocol.Room) error
	ImportFollowMessage(context.Context, protocol.Follow, string, protocol.Message) (bool, error)
	GetFollowCheckpoint(context.Context, string) (Checkpoint, error)
	SetFollowCheckpoint(context.Context, string, Checkpoint) error
	SetFollowCheckpoints(context.Context, map[string]Checkpoint, []string) error
}

Jump to

Keyboard shortcuts

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