mock

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ctx

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

Ctx is a mock implementation of vango.Ctx for testing.

func NewCtx

func NewCtx(t testing.TB) *Ctx

NewCtx creates a new mock context for testing.

func (*Ctx) Close

func (c *Ctx) Close()

Close cancels the context and releases resources.

func (*Ctx) Dispatch

func (c *Ctx) Dispatch(fn func())

Dispatch queues a function to run on the simulated event loop.

func (*Ctx) DrainDispatch

func (c *Ctx) DrainDispatch() int

DrainDispatch executes all queued dispatch functions. Returns the number of functions executed.

func (*Ctx) PendingDispatch

func (c *Ctx) PendingDispatch() bool

PendingDispatch reports whether any dispatch callbacks are queued.

func (*Ctx) Session

func (c *Ctx) Session() vango.Session

Session returns the mock session store.

func (*Ctx) StdContext

func (c *Ctx) StdContext() context.Context

StdContext returns the underlying context.Context.

func (*Ctx) StormBudget

func (c *Ctx) StormBudget() vango.StormBudgetChecker

StormBudget returns nil (no budget enforcement in tests).

Jump to

Keyboard shortcuts

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