gold

package
v0.0.0-...-5dcd16a Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Mature implemenations of various backend-modules.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArticleDirectEX

type ArticleDirectEX interface {
	newspolyglot.ArticleDirectDB

	ArticleDirectStore(exp uint64, ov *newspolyglot.ArticleOverview, obj *newspolyglot.ArticleObject) (err error)
	ArticleDirectRollback(id []byte)
}

type ArticleGroupEX

type ArticleGroupEX interface {
	newspolyglot.ArticleGroupDB

	StoreArticleInfos(groups [][]byte, nums []int64, exp uint64, ov *newspolyglot.ArticleOverview) (err error)
	GroupRealtimeQuery(group []byte) (number int64, low int64, high int64, ok bool)
}

type ArticleGroupWrapper

type ArticleGroupWrapper struct {
	newspolyglot.ArticleGroupDB
	Direct newspolyglot.ArticleDirectDB
}

func (*ArticleGroupWrapper) ArticleGroupGet

func (a *ArticleGroupWrapper) ArticleGroupGet(group []byte, num int64, head, body bool, id_buf []byte) ([]byte, *newspolyglot.ArticleObject)

type GroupListDB

type GroupListDB interface {
	AddGroupDescr(group, descr []byte) error
	AddGroupStatus(group []byte, status byte) error

	GroupHeadFilterWithAuth(rank postauth.AuthRank, groups [][]byte) ([][]byte, error)
	GroupBaseList(status, descr bool, targ func(group []byte, status byte, descr []byte)) bool
}

type GroupRealtimeImpl

type GroupRealtimeImpl struct {
	ArticleGroupEX
	List GroupListDB
}

func (*GroupRealtimeImpl) GroupRealtimeList

func (g *GroupRealtimeImpl) GroupRealtimeList(targ func(group []byte, high, low int64, status byte)) bool

func (*GroupRealtimeImpl) GroupRealtimeQuery

func (g *GroupRealtimeImpl) GroupRealtimeQuery(group []byte) (number int64, low int64, high int64, ok bool)

type GroupStaticImpl

type GroupStaticImpl struct {
	List GroupListDB
}

func (*GroupStaticImpl) GroupStaticList

func (g *GroupStaticImpl) GroupStaticList(targ func(group []byte, descr []byte)) bool

type PostingDecisionLite

type PostingDecisionLite struct {
	ExpireAt time.Time
	// contains filtered or unexported fields
}

type PostingImpl

type PostingImpl struct {
	Grp ArticleGroupEX
	Dir ArticleDirectEX

	Policy PostingPolicyLite
}

func (*PostingImpl) ArticlePostingCheckPost

func (p *PostingImpl) ArticlePostingCheckPost() (possible bool)

func (*PostingImpl) ArticlePostingCheckPostId

func (p *PostingImpl) ArticlePostingCheckPostId(id []byte) (wanted bool, possible bool)

func (*PostingImpl) ArticlePostingPost

func (p *PostingImpl) ArticlePostingPost(headp *posting.HeadInfo, body []byte, ngs [][]byte, numbs []int64) (rejected bool, failed bool, err error)

type PostingPolicyLite

type PostingPolicyLite interface {
	DecideLite(groups [][]byte, lines, length int64) PostingDecisionLite
}

Directories

Path Synopsis
Cassandra backend for gold.ArticleDirectEX.
Cassandra backend for gold.ArticleDirectEX.
PostgreSQL + Badger for storage.
PostgreSQL + Badger for storage.
Cassandra backend for GroupIDX.
Cassandra backend for GroupIDX.
Blue - In-Memory sequence using Apache Cassandra to record all changes.
Blue - In-Memory sequence using Apache Cassandra to record all changes.
Helper to implement GroupHead sequences.
Helper to implement GroupHead sequences.
Cassandra backend for gold.GroupListDB.
Cassandra backend for gold.GroupListDB.
Implementations for the interfaces provided by the 'policies' packages.
Implementations for the interfaces provided by the 'policies' packages.

Jump to

Keyboard shortcuts

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