counter

package
v0.2.0-dev.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CounterContractSuite

type CounterContractSuite struct {
	suite.Suite
	// contains filtered or unexported fields
}

CounterContractSuite defines the contract tests for the counter.Counter interface. All counter implementations must pass these tests. Implementation-specific tests should embed this suite and call SetCounter().

func (*CounterContractSuite) SetContext

func (s *CounterContractSuite) SetContext(ctx context.Context)

SetContext sets the context for tests

func (*CounterContractSuite) SetCounter

func (s *CounterContractSuite) SetCounter(c counter.Counter)

SetCounter is called by implementation tests to provide the concrete counter instance

func (*CounterContractSuite) SetLogger

func (s *CounterContractSuite) SetLogger(log *testutil.TestLogger)

SetLogger sets the logger for tests

func (*CounterContractSuite) TestCounter_Concurrency

func (s *CounterContractSuite) TestCounter_Concurrency()

TestCounter_Concurrency tests concurrent access to the same counter

func (*CounterContractSuite) TestCounter_MultipleDomains

func (s *CounterContractSuite) TestCounter_MultipleDomains()

TestCounter_MultipleDomains tests independent counters

func (*CounterContractSuite) TestCounter_Next

func (s *CounterContractSuite) TestCounter_Next()

TestCounter_Next tests getting the next sequence number

Jump to

Keyboard shortcuts

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