Help us shape the future of Go! Take the 2026 Go Developer Survey

fixtures

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRelayScaleNodeCount    = 250
	DefaultRelayScaleSessionCount = 1000
	DefaultRelayScaleRelayCount   = 8
	RelayScaleEndpointCanary      = "192.0.2."
	RelayScaleDiscoCanary         = "d:feed"
)
View Source
const (
	DefaultScaleSeed      int64 = 0x7461696c70617468
	DefaultScaleNodeCount       = 250
	DefaultScaleEdgeCount       = 1000
)
View Source
const DefaultDirectoryDeviceCount = 250

Variables

This section is empty.

Functions

func DeviceDirectorySnapshot added in v0.5.0

func DeviceDirectorySnapshot(at time.Time, count int) domain.DirectorySnapshot

Types

type Generator

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

func New

func New(application *app.App, logger *slog.Logger) *Generator

func (*Generator) Start

func (g *Generator) Start(ctx context.Context) error

type RelayScaleConfig added in v0.4.0

type RelayScaleConfig struct {
	Seed         int64
	NodeCount    int
	SessionCount int
	RelayCount   int
}

func DefaultRelayScaleConfig added in v0.4.0

func DefaultRelayScaleConfig() RelayScaleConfig

type RelayScaleScenario added in v0.4.0

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

func NewRelayScaleScenario added in v0.4.0

func NewRelayScaleScenario(config RelayScaleConfig) (*RelayScaleScenario, error)

func (*RelayScaleScenario) Load added in v0.4.0

func (s *RelayScaleScenario) Load(ctx context.Context, application *app.App, at time.Time) error

func (*RelayScaleScenario) NodeCount added in v0.4.0

func (s *RelayScaleScenario) NodeCount() int

func (*RelayScaleScenario) RelayCount added in v0.4.0

func (s *RelayScaleScenario) RelayCount() int

func (*RelayScaleScenario) Reports added in v0.4.0

func (s *RelayScaleScenario) Reports(at time.Time, sequence int64) []TimedReport

func (*RelayScaleScenario) SessionCount added in v0.4.0

func (s *RelayScaleScenario) SessionCount() int

type ScaleConfig

type ScaleConfig struct {
	Seed      int64
	NodeCount int
	EdgeCount int
}

func DefaultScaleConfig

func DefaultScaleConfig() ScaleConfig

type ScaleScenario

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

func NewScaleScenario

func NewScaleScenario(config ScaleConfig) (*ScaleScenario, error)

func (*ScaleScenario) EdgeCount

func (s *ScaleScenario) EdgeCount() int

func (*ScaleScenario) EdgeMutationObserver added in v0.4.0

func (s *ScaleScenario) EdgeMutationObserver() int

func (*ScaleScenario) EdgeMutationReport

func (s *ScaleScenario) EdgeMutationReport(at time.Time, sequence int64) domain.ReportEnvelope

func (*ScaleScenario) ExporterSnapshots added in v0.4.0

func (s *ScaleScenario) ExporterSnapshots(at time.Time, sequence int64) []exporter.Snapshot

ExporterSnapshots projects the fixed scale topology through the public exporter contract. The sequence controls monotonically increasing absolute counters; it is deliberately not a reporter sequence.

func (*ScaleScenario) HelloReports

func (s *ScaleScenario) HelloReports(at time.Time) []domain.ReportEnvelope

func (*ScaleScenario) Load

func (s *ScaleScenario) Load(ctx context.Context, application *app.App, at time.Time) error

func (*ScaleScenario) NodeCount

func (s *ScaleScenario) NodeCount() int

func (*ScaleScenario) ObserverHelloReport added in v0.4.0

func (s *ScaleScenario) ObserverHelloReport(node int, at time.Time, sequence int64) domain.ReportEnvelope

func (*ScaleScenario) ObserverWithdrawalReport added in v0.4.0

func (s *ScaleScenario) ObserverWithdrawalReport(node int, at time.Time, sequence int64) domain.ReportEnvelope

func (*ScaleScenario) RefreshRuntime

func (s *ScaleScenario) RefreshRuntime(aggregator *aggregate.Aggregator, at time.Time, sequence int64) error

RefreshRuntime keeps the test-only browser fixture inside the ten-second active window after the intentionally unoptimized persistent load finishes.

func (*ScaleScenario) RefreshRuntimeExcluding added in v0.4.0

func (s *ScaleScenario) RefreshRuntimeExcluding(
	aggregator *aggregate.Aggregator,
	at time.Time,
	sequence int64,
	excludedNode int,
) error

func (*ScaleScenario) RefreshRuntimeSequences added in v0.4.0

func (s *ScaleScenario) RefreshRuntimeSequences(
	aggregator *aggregate.Aggregator,
	at time.Time,
	sequences []int64,
	excludedNode int,
) error

func (*ScaleScenario) Reports

func (s *ScaleScenario) Reports(at time.Time) []TimedReport

func (*ScaleScenario) SteadyReports

func (s *ScaleScenario) SteadyReports(at time.Time, sequence int64) []domain.ReportEnvelope

type TimedReport

type TimedReport struct {
	Report     domain.ReportEnvelope
	ReceivedAt time.Time
}

Jump to

Keyboard shortcuts

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