timeline

package
v0.0.0-...-edf5a02 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2022 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package timeline contains different types of timeline backends.

"sorted-set" uses Redis sorted sets as a backend "stream" uses Redis 5 streams as a backend "null" doesn't remember any items added to it

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Items(before, after string) (microsub.Timeline, error)
	Count() (int, error)

	AddItem(item microsub.Item) (bool, error)
	MarkRead(uids []string) error
}

Backend specifies the interface for Timeline. It supports everything that is needed for Ekster to implement the channel protocol for Microsub

func Create

func Create(channel, timelineType string, pool *redis.Pool, db *sql.DB) Backend

Create creates a channel of the specified type. Return nil when the type is not known.

Jump to

Keyboard shortcuts

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