mock

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service provides an in-memory circular buffer based logger for testing.

func NewService

func NewService(capacity int) *Service

NewService creates a new in-memory service with the given capacity.

func (*Service) Close added in v0.0.3

func (s *Service) Close() error

Close resets the buffer and releases any held resources.

func (*Service) Log

func (s *Service) Log(text string, actors ...uint32) error

Log stores a log entry in the circular buffer.

func (*Service) Query

func (s *Service) Query(from, to time.Time, actors ...uint32) iter.Seq2[time.Time, string]

Query returns entries containing all specified actors within the time range.

Jump to

Keyboard shortcuts

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