cachecontracts

package
v0.76.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache[Ent, ID any] interface {
	crud.Creator[Ent]
	crud.Finder[Ent, ID]
	crud.Updater[Ent]
	crud.Deleter[ID]
	pubsub.CreatorPublisher[Ent]
	pubsub.UpdaterPublisher[Ent]
	pubsub.DeleterPublisher[ID]
}

type EntityStorage

type EntityStorage[Ent, ID any] struct {
	Subject func(testing.TB) (cache.EntityStorage[Ent, ID], comproto.OnePhaseCommitProtocol)
	MakeCtx func(testing.TB) context.Context
	MakeEnt func(testing.TB) Ent
}

func (EntityStorage[Ent, ID]) Benchmark

func (c EntityStorage[Ent, ID]) Benchmark(b *testing.B)

func (EntityStorage[Ent, ID]) Spec

func (c EntityStorage[Ent, ID]) Spec(s *testcase.Spec)

func (EntityStorage[Ent, ID]) Test

func (c EntityStorage[Ent, ID]) Test(t *testing.T)

type Manager

type Manager[Ent, ID any] struct {
	Subject func(testing.TB) ManagerSubject[Ent, ID]
	MakeCtx func(testing.TB) context.Context
	MakeEnt func(testing.TB) Ent
}

func (Manager[Ent, ID]) Benchmark

func (c Manager[Ent, ID]) Benchmark(b *testing.B)

func (Manager[Ent, ID]) ManagerSubject

func (c Manager[Ent, ID]) ManagerSubject() testcase.Var[ManagerSubject[Ent, ID]]

func (Manager[Ent, ID]) Spec

func (c Manager[Ent, ID]) Spec(s *testcase.Spec)

func (Manager[Ent, ID]) Test

func (c Manager[Ent, ID]) Test(t *testing.T)

type ManagerSubject

type ManagerSubject[Ent, ID any] struct {
	Cache         Cache[Ent, ID]
	Source        cache.Source[Ent, ID]
	CommitManager comproto.OnePhaseCommitProtocol
}

type SpySource

type SpySource[Ent, ID any] struct {
	cache.Source[Ent, ID]
	// contains filtered or unexported fields
}

func (*SpySource[Ent, ID]) FindByID

func (stub *SpySource[Ent, ID]) FindByID(ctx context.Context, id ID) (_ent Ent, _found bool, _err error)

type Storage

type Storage[Ent, ID any] struct {
	Subject func(testing.TB) cache.Storage[Ent, ID]
	Context func(testing.TB) context.Context
	MakeEnt func(testing.TB) Ent
}

func (Storage[Ent, ID]) Benchmark

func (c Storage[Ent, ID]) Benchmark(b *testing.B)

func (Storage[Ent, ID]) Spec

func (c Storage[Ent, ID]) Spec(s *testcase.Spec)

func (Storage[Ent, ID]) Test

func (c Storage[Ent, ID]) Test(t *testing.T)

Jump to

Keyboard shortcuts

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