cache

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APCaches added in v0.7.0

type APCaches interface {
	// Init will initialize all the ActivityPub caches in this collection.
	// NOTE: the cache MUST NOT be in use anywhere, this is not thread-safe.
	Init()

	// Start will attempt to start all of the ActivityPub caches, or panic.
	Start()

	// Stop will attempt to stop all of the ActivityPub caches, or panic.
	Stop()
}

func NewAP added in v0.7.0

func NewAP() APCaches

NewAP returns a new default implementation of APCaches.

type Caches added in v0.7.0

type Caches struct {
	// GTS provides access to the collection of gtsmodel object caches.
	GTS GTSCaches

	// AP provides access to the collection of ActivityPub object caches.
	AP APCaches
	// contains filtered or unexported fields
}

func (*Caches) Init added in v0.7.0

func (c *Caches) Init()

Init will (re)initialize both the GTS and AP cache collections. NOTE: the cache MUST NOT be in use anywhere, this is not thread-safe.

func (*Caches) Start added in v0.7.0

func (c *Caches) Start()

Start will start both the GTS and AP cache collections.

func (*Caches) Stop added in v0.7.0

func (c *Caches) Stop()

Stop will stop both the GTS and AP cache collections.

type GTSCaches added in v0.7.0

type GTSCaches interface {
	// Init will initialize all the gtsmodel caches in this collection.
	// NOTE: the cache MUST NOT be in use anywhere, this is not thread-safe.
	Init()

	// Start will attempt to start all of the gtsmodel caches, or panic.
	Start()

	// Stop will attempt to stop all of the gtsmodel caches, or panic.
	Stop()

	// Account provides access to the gtsmodel Account database cache.
	Account() *result.Cache[*gtsmodel.Account]

	// Block provides access to the gtsmodel Block (account) database cache.
	Block() *result.Cache[*gtsmodel.Block]

	// DomainBlock provides access to the domain block database cache.
	DomainBlock() *domain.BlockCache

	// Emoji provides access to the gtsmodel Emoji database cache.
	Emoji() *result.Cache[*gtsmodel.Emoji]

	// EmojiCategory provides access to the gtsmodel EmojiCategory database cache.
	EmojiCategory() *result.Cache[*gtsmodel.EmojiCategory]

	// Mention provides access to the gtsmodel Mention database cache.
	Mention() *result.Cache[*gtsmodel.Mention]

	// Notification provides access to the gtsmodel Notification database cache.
	Notification() *result.Cache[*gtsmodel.Notification]

	// Report provides access to the gtsmodel Report database cache.
	Report() *result.Cache[*gtsmodel.Report]

	// Status provides access to the gtsmodel Status database cache.
	Status() *result.Cache[*gtsmodel.Status]

	// Tombstone provides access to the gtsmodel Tombstone database cache.
	Tombstone() *result.Cache[*gtsmodel.Tombstone]

	// User provides access to the gtsmodel User database cache.
	User() *result.Cache[*gtsmodel.User]
}

func NewGTS added in v0.7.0

func NewGTS() GTSCaches

NewGTS returns a new default implementation of GTSCaches.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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