collections

package
v4.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SegmentChangesCollection

type SegmentChangesCollection struct {
	boltdb.Collection
	// contains filtered or unexported fields
}

SegmentChangesCollection represents a collection of SplitChangesItem

func NewSegmentChangesCollection

func NewSegmentChangesCollection(dbb *bolt.DB) SegmentChangesCollection

NewSegmentChangesCollection returns an instance of SegmentChangesCollection

func (*SegmentChangesCollection) Add

Add an item

func (*SegmentChangesCollection) ChangeNumber

func (c *SegmentChangesCollection) ChangeNumber(segment string) int64

ChangeNumber returns changeNumber

func (*SegmentChangesCollection) Fetch

Fetch return a SegmentChangesItem

func (*SegmentChangesCollection) FetchAll

FetchAll return a list of SegmentChangesItem

func (*SegmentChangesCollection) SetChangeNumber

func (c *SegmentChangesCollection) SetChangeNumber(segment string, since int64)

SetChangeNumber sets changeNumber

type SegmentChangesItem

type SegmentChangesItem struct {
	Name string
	Keys map[string]SegmentKey
}

SegmentChangesItem represents an SplitChanges service response

type SegmentKey

type SegmentKey struct {
	Name         string
	ChangeNumber int64
	Removed      bool
}

SegmentKey represents a segment key data

type SplitChangesCollection

type SplitChangesCollection struct {
	boltdb.Collection
	// contains filtered or unexported fields
}

SplitChangesCollection represents a collection of SplitChangesItem

func NewSplitChangesCollection

func NewSplitChangesCollection(dbb *bolt.DB) SplitChangesCollection

NewSplitChangesCollection returns an instance of SplitChangesCollection

func (*SplitChangesCollection) Add

Add an item

func (*SplitChangesCollection) ChangeNumber

func (c *SplitChangesCollection) ChangeNumber() int64

ChangeNumber returns changeNumber

func (*SplitChangesCollection) Delete

Delete an item

func (*SplitChangesCollection) FetchAll

FetchAll return a SplitChangesItem

func (*SplitChangesCollection) SegmentNames

func (c *SplitChangesCollection) SegmentNames() *set.ThreadUnsafeSet

SegmentNames returns segments

func (*SplitChangesCollection) SetChangeNumber

func (c *SplitChangesCollection) SetChangeNumber(since int64)

SetChangeNumber sets changeNumber

type SplitChangesItem

type SplitChangesItem struct {
	ChangeNumber int64  `json:"changeNumber"`
	Name         string `json:"name"`
	Status       string `json:"status"`
	JSON         string
}

SplitChangesItem represents an SplitChanges service response

type SplitsChangesItems

type SplitsChangesItems []SplitChangesItem

SplitsChangesItems Sortable list

func (SplitsChangesItems) Len

func (slice SplitsChangesItems) Len() int

func (SplitsChangesItems) Less

func (slice SplitsChangesItems) Less(i, j int) bool

func (SplitsChangesItems) Swap

func (slice SplitsChangesItems) Swap(i, j int)

Jump to

Keyboard shortcuts

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