Documentation ¶
Index ¶
- Constants
- func SetupTestDB() *gorm.DB
- func WithSkipBroadcast() withOption
- func WithTransient() withOption
- type Crudr
- func (c *Crudr) AddOpCallback(cb func(op *Op, records interface{}))
- func (c *Crudr) ApplyOp(op *Op) error
- func (c *Crudr) Create(data interface{}, opts ...withOption) error
- func (c *Crudr) Delete(data interface{}, opts ...withOption) error
- func (c *Crudr) ForceSweep()
- func (c *Crudr) GetOutboxSizes() map[string]int
- func (c *Crudr) GetPercentNodesSeeded() float64
- func (c *Crudr) KnownType(op *Op) bool
- func (c *Crudr) Patch(data interface{}, opts ...withOption) error
- func (c *Crudr) RegisterModels(tables ...interface{}) *Crudr
- func (c *Crudr) StartClients()
- func (c *Crudr) Update(data interface{}, opts ...withOption) error
- type Cursor
- type Op
- type PeerClient
Constants ¶
View Source
const ( ActionCreate = "create" ActionUpdate = "update" ActionDelete = "delete" )
View Source
const ( LocalStreamName = "ops" GlobalStreamName = "global" )
Variables ¶
This section is empty.
Functions ¶
func SetupTestDB ¶
func WithSkipBroadcast ¶
func WithSkipBroadcast() withOption
func WithTransient ¶
func WithTransient() withOption
Types ¶
type Crudr ¶
func (*Crudr) AddOpCallback ¶
func (*Crudr) GetOutboxSizes ¶
func (*Crudr) GetPercentNodesSeeded ¶
func (*Crudr) RegisterModels ¶
RegisterModels accepts a instance of a GORM model and registers it to work with Op apply.
func (*Crudr) StartClients ¶
func (c *Crudr) StartClients()
type Op ¶
type PeerClient ¶
func NewPeerClient ¶
func NewPeerClient(host string, crudr *Crudr, selfHost string) *PeerClient
func (*PeerClient) Send ¶
func (p *PeerClient) Send(data []byte) bool
func (*PeerClient) Start ¶
func (p *PeerClient) Start()
Click to show internal directories.
Click to hide internal directories.