test

package
v2.0.0-...-5024b2a Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	Value int `json:"value"`
}

func NewBase

func NewBase() *Base

func (*Base) Apply

func (b *Base) Apply(c tapedb.Change) error

func (*Base) ReadFrom

func (b *Base) ReadFrom(r io.Reader) (int64, error)

func (*Base) WriteTo

func (b *Base) WriteTo(w io.Writer) (int64, error)

type ChangeAttachPayload

type ChangeAttachPayload struct {
	PayloadID string `json:"payloadID"`
}

func (*ChangeAttachPayload) PayloadIDs

func (c *ChangeAttachPayload) PayloadIDs() []string

func (*ChangeAttachPayload) ReadFrom

func (c *ChangeAttachPayload) ReadFrom(r io.Reader) (int64, error)

func (*ChangeAttachPayload) TypeName

func (c *ChangeAttachPayload) TypeName() string

func (*ChangeAttachPayload) WriteTo

func (c *ChangeAttachPayload) WriteTo(w io.Writer) (int64, error)

type ChangeCounterInc

type ChangeCounterInc struct {
	Value int `json:"value"`
}

func (*ChangeCounterInc) ReadFrom

func (c *ChangeCounterInc) ReadFrom(r io.Reader) (int64, error)

func (*ChangeCounterInc) TypeName

func (c *ChangeCounterInc) TypeName() string

func (*ChangeCounterInc) WriteTo

func (c *ChangeCounterInc) WriteTo(w io.Writer) (int64, error)

type Factory

type Factory struct{}

func NewFactory

func NewFactory() *Factory

func (*Factory) NewBase

func (f *Factory) NewBase() *Base

func (*Factory) NewChange

func (f *Factory) NewChange(typeName string) (tapedb.Change, error)

func (*Factory) NewState

func (f *Factory) NewState(base *Base, readLocker sync.Locker) *State

type State

type State struct {
	Counter    int
	ReadLocker sync.Locker
}

func NewState

func NewState(b *Base, rl sync.Locker) *State

func (*State) Apply

func (s *State) Apply(c tapedb.Change) error

Jump to

Keyboard shortcuts

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