checker

package
v0.0.0-...-43a2b60 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker struct {
	*Visualizer
}

Checker validates that a history is correct with respect to some model.

func NewChecker

func NewChecker() *Checker

Creates a new Checker with reasonable defaults.

func (*Checker) Check

func (c *Checker) Check(history []store.Operation) error

Check verifies the history is linearizably consistent with respect to the model.

type CompletePromiseVerifier

type CompletePromiseVerifier struct{}

func (*CompletePromiseVerifier) Verify

func (v *CompletePromiseVerifier) Verify(state State, req, resp event) (State, error)

type CreatePromiseVerifier

type CreatePromiseVerifier struct{}

func (*CreatePromiseVerifier) Verify

func (v *CreatePromiseVerifier) Verify(state State, req, resp event) (State, error)

type DurablePromiseModel

type DurablePromiseModel struct {
	SequentialSpec map[store.API]StepVerifier
}

A Model is a sequential specification of the durable promise system.

func (*DurablePromiseModel) Init

func (m *DurablePromiseModel) Init() State

func (*DurablePromiseModel) Step

func (m *DurablePromiseModel) Step(state State, input, output event) (State, error)

type GetPromiseVerifier

type GetPromiseVerifier struct{}

func (*GetPromiseVerifier) Verify

func (v *GetPromiseVerifier) Verify(state State, req, resp event) (State, error)

type SearchPromiseVerifier

type SearchPromiseVerifier struct{}

func (*SearchPromiseVerifier) Verify

func (v *SearchPromiseVerifier) Verify(state State, req, resp event) (State, error)

type State

type State map[string]*openapi.Promise

State holds the expectation of the client

func (State) Completed

func (s State) Completed(key string) bool

func (State) Exists

func (s State) Exists(key string) bool

func (State) Get

func (s State) Get(key string) (*openapi.Promise, error)

func (State) Search

func (s State) Search(stateParam string) []openapi.Promise

func (State) Set

func (s State) Set(key string, val *openapi.Promise)

func (State) String

func (s State) String() string

type StepVerifier

type StepVerifier interface {
	Verify(st State, in event, out event) (State, error)
}

type Visualizer

type Visualizer struct{}

func NewVisualizer

func NewVisualizer() *Visualizer

func (*Visualizer) Summary

func (v *Visualizer) Summary(pass bool, today string, history []store.Operation) error

renders timeline of history and performance analysis

Jump to

Keyboard shortcuts

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