Documentation
¶
Overview ¶
Package channeltest defines the transport-neutral FrameChannel behavior matrix. Transport packages provide a factory that exposes peer-side controls without leaking their implementation details into the session module.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Fixture ¶
type Fixture struct {
Channel framechannel.Channel
ReceiveSent func(context.Context) (SentFrame, error)
Deliver func(framechannel.Frame) error
DeliverTerminal func(framechannel.Frame) error
RemoteClose func() error
// SaturateSends must return only after the next valid Send will wait for
// capacity. ReleaseSends must be idempotent so cleanup can always call it.
SaturateSends func(testing.TB)
ReleaseSends func()
Cleanup func()
}
Fixture projects the peer side of one freshly opened adapter. The callbacks let the suite drive remote events while keeping transport construction, framing, and saturation mechanics inside the implementing package.
type SentFrame ¶
type SentFrame struct {
Frame framechannel.Frame
Terminal bool
}
SentFrame is one frame observed after the adapter accepted it for transport. Terminal remains explicit because terminal delivery has stronger completion and lifecycle semantics than an ordinary frame.