feedstypes

package
v0.0.0-...-9835270 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: AGPL-3.0, Apache-2.0, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientDataStream

type ClientDataStream struct {
	Offset     int64
	DataStream *types.ActDataStreamUpdate
}

func (*ClientDataStream) GetDataStream

func (cds *ClientDataStream) GetDataStream() *types.ActDataStreamUpdate

func (*ClientDataStream) GetOffset

func (cds *ClientDataStream) GetOffset() int64

type EventReadStream

type EventReadStream struct {
	Offset    int64
	EventID   string
	EventType string
}

func (*EventReadStream) GetOffset

func (es *EventReadStream) GetOffset() int64

type Feed

type Feed interface {
	GetOffset() int64
}

type KeyChangeStream

type KeyChangeStream struct {
	Offset     int64
	DataStream *types.KeyChangeStream
}

func (*KeyChangeStream) GetDataStream

func (kcs *KeyChangeStream) GetDataStream() *types.KeyChangeStream

func (*KeyChangeStream) GetOffset

func (kcs *KeyChangeStream) GetOffset() int64

type PresenceDataStream

type PresenceDataStream struct {
	Offset     int64
	DataStream *types.PresenceStream
}

func (*PresenceDataStream) GetDataStream

func (pds *PresenceDataStream) GetDataStream() *types.PresenceStream

func (*PresenceDataStream) GetOffset

func (pds *PresenceDataStream) GetOffset() int64

type ReceiptDataStream

type ReceiptDataStream struct {
	Offset     int64
	DataStream *types.ReceiptStream
	Written    bool
}

func (*ReceiptDataStream) GetDataStream

func (rds *ReceiptDataStream) GetDataStream() *types.ReceiptStream

func (*ReceiptDataStream) GetOffset

func (rds *ReceiptDataStream) GetOffset() int64

type STDEventStream

type STDEventStream struct {
	Offset         int64
	DataStream     *types.StdEvent
	TargetUserID   string
	TargetDeviceID string
	Written        bool
	Read           bool
}

func (*STDEventStream) GetDataStream

func (stdEventStream *STDEventStream) GetDataStream() *types.StdEvent

func (*STDEventStream) GetOffset

func (stdEventStream *STDEventStream) GetOffset() int64

type StreamEvent

type StreamEvent struct {
	Offset    int64
	Ev        *gomatrixserverlib.ClientEvent
	IsDeleted bool
}

func (*StreamEvent) GetEv

func (*StreamEvent) GetOffset

func (se *StreamEvent) GetOffset() int64

type TimeLineEvent

type TimeLineEvent struct {
	Offset int64
	Ev     *syncapitypes.UserTimeLineStream
}

func (*TimeLineEvent) GetEv

func (*TimeLineEvent) GetOffset

func (se *TimeLineEvent) GetOffset() int64

type TimeLines

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

func NewEvTimeLines

func NewEvTimeLines(size int, limit bool) *TimeLines

func (*TimeLines) Add

func (tl *TimeLines) Add(feed Feed) Feed

func (*TimeLines) Console

func (tl *TimeLines) Console()

func (*TimeLines) Expanse

func (tl *TimeLines) Expanse() int

func (*TimeLines) ForRange

func (tl *TimeLines) ForRange(f func(offset int, feed Feed) bool)

func (*TimeLines) ForRangeReverse

func (tl *TimeLines) ForRangeReverse(f func(offset int, feed Feed) bool)

func (*TimeLines) GetAllFeeds

func (tl *TimeLines) GetAllFeeds() ([]Feed, int, int, int64, int64)

func (*TimeLines) GetAllFeedsReverse

func (tl *TimeLines) GetAllFeedsReverse() ([]Feed, int, int, int64, int64)

func (*TimeLines) GetFeedRange

func (tl *TimeLines) GetFeedRange() (int64, int64)

func (*TimeLines) GetFeeds

func (tl *TimeLines) GetFeeds(fromPos, endPos int64) ([]Feed, int, int, int64, int64)

func (*TimeLines) GetRange

func (tl *TimeLines) GetRange() (int, int)

func (*TimeLines) RAtomic

func (tl *TimeLines) RAtomic(f func(data *TimeLinesAtomicData))

RAtomic 原子性读操作,尽量在回调中减少计算量,否则锁的时间加长

type TimeLinesAtomicData

type TimeLinesAtomicData struct {
	Size   int
	Offset int
	Limit  bool

	Start int
	End   int
	Lower int64
	Upper int64
	Data  []Feed
	Ofo   bool
}

Jump to

Keyboard shortcuts

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