dst

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backchannel added in v0.7.0

type Backchannel struct {
	Task    *task.Task
	Promise *promise.Promise
}

type BcKind added in v0.7.8

type BcKind int
const (
	Task BcKind = iota
	Notify
)

type BcValidator added in v0.7.0

type BcValidator struct {
	// contains filtered or unexported fields
}

func NewBcValidator added in v0.7.0

func NewBcValidator(r *rand.Rand, config *Config) *BcValidator

func (*BcValidator) AddBcValidator added in v0.7.0

func (v *BcValidator) AddBcValidator(bcv BcValidatorFn)

func (*BcValidator) Validate added in v0.7.0

func (v *BcValidator) Validate(model *Model, reqTime int64, resTime int64, req *Req) (*Model, error)

type BcValidatorFn added in v0.7.0

type BcValidatorFn func(*Model, int64, int64, *Req) (*Model, error)

type Config

type Config struct {
	Ticks              int64
	Timeout            time.Duration
	VisualizationPath  string
	Verbose            bool
	PrintOps           bool
	TimeElapsedPerTick int64
	TimeoutTicks       int64
	ReqsPerTick        func() int
	MaxReqsPerTick     int64
	Ids                int
	IdempotencyKeys    int
	Headers            int
	Data               int
	Tags               int
	FaultInjection     bool
	Backchannel        chan interface{}
}

type DST

type DST struct {
	// contains filtered or unexported fields
}

func New

func New(r *rand.Rand, config *Config) *DST

func (*DST) Add added in v0.6.0

func (d *DST) Add(kind t_api.Kind, generator RequestGenerator, validator ResponseValidator)

func (*DST) Model added in v0.6.0

func (d *DST) Model() porcupine.Model

func (*DST) Run

func (d *DST) Run(r *rand.Rand, api api.API, aio aio.AIO, system *system.System) bool

func (*DST) Step added in v0.6.0

func (d *DST) Step(model *Model, reqTime int64, resTime int64, req *t_api.Request, res *t_api.Response, err error) (*Model, error)

func (*DST) StepBc added in v0.7.10

func (d *DST) StepBc(model *Model, reqTime int64, resTime int64, req *Req) (*Model, error)

func (*DST) String

func (d *DST) String() string

func (*DST) Time added in v0.6.0

func (d *DST) Time(t int64) int64

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

func NewGenerator

func NewGenerator(r *rand.Rand, config *Config) *Generator

func (*Generator) AddGenerator added in v0.7.0

func (g *Generator) AddGenerator(kind t_api.Kind, generator RequestGenerator)

func (*Generator) AddRequest

func (g *Generator) AddRequest(req *t_api.Request)

func (*Generator) Generate

func (g *Generator) Generate(r *rand.Rand, t int64, n int) []*t_api.Request

func (*Generator) GenerateAcquireLock added in v0.2.0

func (g *Generator) GenerateAcquireLock(r *rand.Rand, t int64) *t_api.Request

func (*Generator) GenerateClaimTask added in v0.5.0

func (g *Generator) GenerateClaimTask(r *rand.Rand, t int64) *t_api.Request

func (*Generator) GenerateCompletePromise added in v0.5.0

func (g *Generator) GenerateCompletePromise(r *rand.Rand, t int64) *t_api.Request

func (*Generator) GenerateCompleteTask added in v0.5.0

func (g *Generator) GenerateCompleteTask(r *rand.Rand, t int64) *t_api.Request

func (*Generator) GenerateCreateCallback added in v0.7.0

func (g *Generator) GenerateCreateCallback(r *rand.Rand, t int64) *t_api.Request

func (*Generator) GenerateCreatePromise

func (g *Generator) GenerateCreatePromise(r *rand.Rand, t int64) *t_api.Request

func (*Generator) GenerateCreatePromiseAndTask added in v0.7.0

func (g *Generator) GenerateCreatePromiseAndTask(r *rand.Rand, t int64) *t_api.Request

func (*Generator) GenerateCreateSchedule

func (g *Generator) GenerateCreateSchedule(r *rand.Rand, t int64) *t_api.Request

func (*Generator) GenerateDeleteSchedule

func (g *Generator) GenerateDeleteSchedule(r *rand.Rand, t int64) *t_api.Request

func (*Generator) GenerateDropTask added in v0.7.8

func (g *Generator) GenerateDropTask(r *rand.Rand, t int64) *t_api.Request

func (*Generator) GenerateHeartbeatLocks added in v0.2.0

func (g *Generator) GenerateHeartbeatLocks(r *rand.Rand, t int64) *t_api.Request

func (*Generator) GenerateHeartbeatTasks added in v0.7.0

func (g *Generator) GenerateHeartbeatTasks(r *rand.Rand, t int64) *t_api.Request

func (*Generator) GenerateReadPromise

func (g *Generator) GenerateReadPromise(r *rand.Rand, t int64) *t_api.Request

func (*Generator) GenerateReadSchedule

func (g *Generator) GenerateReadSchedule(r *rand.Rand, t int64) *t_api.Request

func (*Generator) GenerateReleaseLock added in v0.2.0

func (g *Generator) GenerateReleaseLock(r *rand.Rand, t int64) *t_api.Request

func (*Generator) GenerateSearchPromises

func (g *Generator) GenerateSearchPromises(r *rand.Rand, t int64) *t_api.Request

func (*Generator) GenerateSearchSchedules

func (g *Generator) GenerateSearchSchedules(r *rand.Rand, t int64) *t_api.Request

type Kind added in v0.5.0

type Kind int
const (
	Op Kind = iota
	Bc
)

type Model

type Model struct {
	// contains filtered or unexported fields
}

func NewModel

func NewModel() *Model

func ValidateNotify added in v0.7.8

func ValidateNotify(model *Model, reqTime int64, resTime int64, req *Req) (*Model, error)

func ValidateTaskExpiry added in v0.8.2

func ValidateTaskExpiry(model *Model, reqTime int64, _ int64, req *Req) (*Model, error)

func ValidateTasksWithSameRootPromiseId added in v0.7.0

func ValidateTasksWithSameRootPromiseId(model *Model, reqTime int64, _ int64, req *Req) (*Model, error)

func (*Model) Copy added in v0.6.0

func (m *Model) Copy() *Model

func (*Model) Equals added in v0.6.0

func (m1 *Model) Equals(m2 *Model) bool

type Partition added in v0.7.2

type Partition int

type Req added in v0.6.0

type Req struct {
	// contains filtered or unexported fields
}

type RequestGenerator

type RequestGenerator func(*rand.Rand, int64) *t_api.Request

type Res added in v0.6.0

type Res struct {
	// contains filtered or unexported fields
}

type ResponseValidator

type ResponseValidator func(*Model, int64, int64, *t_api.Request, *t_api.Response) (*Model, error)

type Store added in v0.6.0

type Store[I relatable, T equatable[T]] []*struct {
	// contains filtered or unexported fields
}

type Validator added in v0.6.0

type Validator struct {
	// contains filtered or unexported fields
}

func NewValidator added in v0.6.0

func NewValidator(r *rand.Rand, config *Config) *Validator

func (*Validator) AddValidator added in v0.7.0

func (v *Validator) AddValidator(kind t_api.Kind, validator ResponseValidator)

func (*Validator) Validate added in v0.6.0

func (v *Validator) Validate(model *Model, reqTime int64, resTime int64, req *t_api.Request, res *t_api.Response) (*Model, error)

func (*Validator) ValidateAcquireLock added in v0.6.0

func (v *Validator) ValidateAcquireLock(model *Model, reqTime int64, resTime int64, req *t_api.Request, res *t_api.Response) (*Model, error)

func (*Validator) ValidateClaimTask added in v0.7.0

func (v *Validator) ValidateClaimTask(model *Model, reqTime int64, resTime int64, req *t_api.Request, res *t_api.Response) (*Model, error)

func (*Validator) ValidateCompletePromise added in v0.6.0

func (v *Validator) ValidateCompletePromise(model *Model, reqTime int64, resTime int64, req *t_api.Request, res *t_api.Response) (*Model, error)

func (*Validator) ValidateCompleteTask added in v0.7.0

func (v *Validator) ValidateCompleteTask(model *Model, reqTime int64, resTime int64, req *t_api.Request, res *t_api.Response) (*Model, error)

func (*Validator) ValidateCreateCallback added in v0.7.0

func (v *Validator) ValidateCreateCallback(model *Model, reqTime int64, resTime int64, req *t_api.Request, res *t_api.Response) (*Model, error)

func (*Validator) ValidateCreatePromise added in v0.6.0

func (v *Validator) ValidateCreatePromise(model *Model, reqTime int64, resTime int64, req *t_api.Request, res *t_api.Response) (*Model, error)

func (*Validator) ValidateCreatePromiseAndTask added in v0.7.0

func (v *Validator) ValidateCreatePromiseAndTask(model *Model, reqTime int64, resTime int64, req *t_api.Request, res *t_api.Response) (*Model, error)

func (*Validator) ValidateCreateSchedule added in v0.6.0

func (v *Validator) ValidateCreateSchedule(model *Model, reqTime int64, resTime int64, req *t_api.Request, res *t_api.Response) (*Model, error)

func (*Validator) ValidateDeleteSchedule added in v0.6.0

func (v *Validator) ValidateDeleteSchedule(model *Model, reqTime int64, resTime int64, req *t_api.Request, res *t_api.Response) (*Model, error)

func (*Validator) ValidateDropTask added in v0.7.8

func (v *Validator) ValidateDropTask(model *Model, reqTime int64, resTime int64, req *t_api.Request, res *t_api.Response) (*Model, error)

func (*Validator) ValidateHeartbeatLocks added in v0.6.0

func (v *Validator) ValidateHeartbeatLocks(model *Model, reqTime int64, resTime int64, req *t_api.Request, res *t_api.Response) (*Model, error)

func (*Validator) ValidateHeartbeatTasks added in v0.7.0

func (v *Validator) ValidateHeartbeatTasks(model *Model, reqTime int64, resTime int64, req *t_api.Request, res *t_api.Response) (*Model, error)

func (*Validator) ValidateReadPromise added in v0.6.0

func (v *Validator) ValidateReadPromise(model *Model, reqTime int64, resTime int64, req *t_api.Request, res *t_api.Response) (*Model, error)

func (*Validator) ValidateReadSchedule added in v0.6.0

func (v *Validator) ValidateReadSchedule(model *Model, reqTime int64, resTime int64, req *t_api.Request, res *t_api.Response) (*Model, error)

func (*Validator) ValidateReleaseLock added in v0.6.0

func (v *Validator) ValidateReleaseLock(model *Model, reqTime int64, resTime int64, req *t_api.Request, res *t_api.Response) (*Model, error)

func (*Validator) ValidateSearchPromises added in v0.6.0

func (v *Validator) ValidateSearchPromises(model *Model, reqTime int64, resTime int64, req *t_api.Request, res *t_api.Response) (*Model, error)

func (*Validator) ValidateSearchSchedules added in v0.6.0

func (v *Validator) ValidateSearchSchedules(model *Model, reqTime int64, resTime int64, req *t_api.Request, res *t_api.Response) (*Model, error)

Jump to

Keyboard shortcuts

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