cassandra

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: 6 Imported by: 0

Documentation

Overview

Apache Cassandra based Backend for Article Storage.

Warning: This is not the final version - assume breaking changes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GnvTable

func GnvTable(ksp gocassa.KeySpace) gocassa.Table

func NewStoredArticleTable

func NewStoredArticleTable(ks gocassa.KeySpace) gocassa.Table

Types

type ArticleOverview

type ArticleOverview struct {
	Subject, Sender, Date, MsgId, Refs []byte
	Bytes, Lines                       int64
}

func (*ArticleOverview) Convert

func (a *ArticleOverview) Convert() *newspolyglot.ArticleOverview

type ArticleStorage

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

func NewArticleStorage

func NewArticleStorage(ks gocassa.KeySpace) *ArticleStorage

func (*ArticleStorage) ArticleDirectGet

func (a *ArticleStorage) ArticleDirectGet(id []byte, head, body bool) *newspolyglot.ArticleObject

func (*ArticleStorage) ArticleDirectOverview

func (a *ArticleStorage) ArticleDirectOverview(id []byte) *newspolyglot.ArticleOverview

func (*ArticleStorage) ArticleDirectStat

func (a *ArticleStorage) ArticleDirectStat(id []byte) bool

func (*ArticleStorage) ArticleGroupGet

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

func (*ArticleStorage) ArticleGroupList

func (a *ArticleStorage) ArticleGroupList(group []byte, first, last int64, targ func(int64))

func (*ArticleStorage) ArticleGroupMove

func (a *ArticleStorage) ArticleGroupMove(group []byte, i int64, backward bool, id_buf []byte) (ni int64, id []byte, ok bool)

func (*ArticleStorage) ArticleGroupOverview

func (a *ArticleStorage) ArticleGroupOverview(group []byte, first, last int64, targ func(int64, *newspolyglot.ArticleOverview))

func (*ArticleStorage) ArticleGroupStat

func (a *ArticleStorage) ArticleGroupStat(group []byte, num int64, id_buf []byte) ([]byte, bool)

func (*ArticleStorage) ArticlePostingCheckPost

func (a *ArticleStorage) ArticlePostingCheckPost() (possible bool)

func (*ArticleStorage) ArticlePostingCheckPostId

func (a *ArticleStorage) ArticlePostingCheckPostId(id []byte) (wanted bool, possible bool)

func (*ArticleStorage) ArticlePostingPost

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

func (*ArticleStorage) Initialize

func (a *ArticleStorage) Initialize()

type GroupManager

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

This class implements GroupHeadCache, GroupHeadDB, GroupRealtimeDB and GroupStaticDB Most Methods are eighter Brittle or Inefficient.

Warning: it is not recommended to use it as GroupHeadDB, unless it is used from a single node or with serious synchronization mechanisms. Otherwise, a race-condition will occure.

func NewGroupManager

func NewGroupManager(ks gocassa.KeySpace) *GroupManager

func (*GroupManager) AdmAddGroup

func (g *GroupManager) AdmAddGroup(group, descr []byte) error

func (*GroupManager) AdmGroupChangeState

func (g *GroupManager) AdmGroupChangeState(group []byte, state byte) error

func (*GroupManager) GroupHeadFilter

func (g *GroupManager) GroupHeadFilter(groups [][]byte) ([][]byte, error)

func (*GroupManager) GroupHeadInsert

func (g *GroupManager) GroupHeadInsert(groups [][]byte, buf []int64) ([]int64, error)

Warning: it is not recommended to use this Method, unless it is used from a single node or with serious synchronization mechanisms. Otherwise, a race-condition will occure.

func (*GroupManager) GroupHeadRevert

func (g *GroupManager) GroupHeadRevert(groups [][]byte, nums []int64) error

Warning: it is not recommended to use this Method, unless it is used from a single node or with serious synchronization mechanisms. Otherwise, a race-condition will occure.

func (*GroupManager) GroupRealtimeList

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

func (*GroupManager) GroupRealtimeQuery

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

func (*GroupManager) GroupStaticList

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

func (*GroupManager) Initialize

func (g *GroupManager) Initialize()

type GroupNumValue

type GroupNumValue struct {
	Partit []byte
	Clustr int
	OrigNo int64
	Value  []byte
}

type GroupRealtime

type GroupRealtime struct {
	Group             []byte
	Number, Low, High int64
	Status            int
}

type GroupStatic

type GroupStatic struct {
	Group []byte
	Descr []byte
}

type StoredArticle

type StoredArticle struct {
	ArticleOverview `cql:",squash"`
	Head, Body      []byte
}

Jump to

Keyboard shortcuts

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