crdt

package
v0.0.40 Latest Latest
Warning

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

Go to latest
Published: May 29, 2019 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package crdt is a generated protocol buffer package.

It is generated from these files:

types.proto

It has these top-level messages:

MockedEntry

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GCEntries

func GCEntries(policy ExpirationPolicy, next func() (Entry, error), gc func(id string) error) error

func GetLastEntryUpdate

func GetLastEntryUpdate(s Entry) int64

func IsEntryAdded

func IsEntryAdded(s Entry) bool

func IsEntryOutdated

func IsEntryOutdated(s Entry, remote Entry) (outdated bool)

func IsEntryRemoved

func IsEntryRemoved(s Entry) bool

Types

type Entry

type Entry interface {
	GetID() string
	GetLastAdded() int64
	GetLastDeleted() int64
}

An Entry is a CRDT struct

type ExpirationPolicy

type ExpirationPolicy func() int64

func ExpireAfter8Hours

func ExpireAfter8Hours() ExpirationPolicy

type MockedEntry

type MockedEntry struct {
	ID          string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"`
	LastAdded   int64  `protobuf:"varint,2,opt,name=LastAdded" json:"LastAdded,omitempty"`
	LastDeleted int64  `protobuf:"varint,3,opt,name=LastDeleted" json:"LastDeleted,omitempty"`
	Data        string `protobuf:"bytes,4,opt,name=Data" json:"Data,omitempty"`
}

func (*MockedEntry) Descriptor

func (*MockedEntry) Descriptor() ([]byte, []int)

func (*MockedEntry) GetData

func (m *MockedEntry) GetData() string

func (*MockedEntry) GetID

func (m *MockedEntry) GetID() string

func (*MockedEntry) GetLastAdded

func (m *MockedEntry) GetLastAdded() int64

func (*MockedEntry) GetLastDeleted

func (m *MockedEntry) GetLastDeleted() int64

func (*MockedEntry) ProtoMessage

func (*MockedEntry) ProtoMessage()

func (*MockedEntry) Reset

func (m *MockedEntry) Reset()

func (*MockedEntry) String

func (m *MockedEntry) String() string

Jump to

Keyboard shortcuts

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