Documentation
¶
Overview ¶
Package conformance provides reusable runner protocol state-machine qualification.
Index ¶
- Variables
- func DefaultSessionFactory(connectionID string) *runnercontrol.Session
- func RunRunnerConformanceSuite(t *testing.T, factory BoundaryFactory)
- func RunSessionSuite(t *testing.T, factory func(connectionID string) *runnercontrol.Session)
- type Boundary
- type BoundaryFactory
- type FakeRunner
- func (runner *FakeRunner) AssignmentReady(fence *runnerv1.AssignmentFence) *runnerv1.RunnerToControlPlane
- func (runner *FakeRunner) Heartbeat(phase runnerv1.DrainPhase) *runnerv1.RunnerToControlPlane
- func (runner *FakeRunner) Hello(minimum, maximum uint32) *runnerv1.RunnerToControlPlane
- func (runner *FakeRunner) Reconnect(connectionID string)
- func (runner *FakeRunner) Registration() *runnerv1.RunnerToControlPlane
- func (runner *FakeRunner) ReorderedAssignmentReady(fence *runnerv1.AssignmentFence, sequence uint64) *runnerv1.RunnerToControlPlane
- func (runner *FakeRunner) ReplayLast() (*runnerv1.RunnerToControlPlane, error)
- type Outcome
- type Snapshot
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrReorderedMessage = errors.New("SecondBox conformance reordered runner message") ErrInactiveConnection = errors.New("SecondBox conformance inactive runner connection") )
Functions ¶
func DefaultSessionFactory ¶
func DefaultSessionFactory(connectionID string) *runnercontrol.Session
DefaultSessionFactory returns the v1 evidence-enabled control-plane session.
func RunRunnerConformanceSuite ¶
func RunRunnerConformanceSuite(t *testing.T, factory BoundaryFactory)
RunRunnerConformanceSuite qualifies every Task 4 runner lifecycle behavior.
func RunSessionSuite ¶
func RunSessionSuite( t *testing.T, factory func(connectionID string) *runnercontrol.Session, )
RunSessionSuite qualifies negotiation, registration, duplicate, reorder, and reconnect behavior.
Types ¶
type Boundary ¶
type Boundary interface {
Connect(
context.Context,
string,
string,
*runnerv1.RunnerToControlPlane,
) (*runnerv1.ControlPlaneToRunner, error)
Receive(
context.Context,
string,
*runnerv1.RunnerToControlPlane,
time.Time,
) (Outcome, error)
SeedAssignment(context.Context, *runnerv1.AssignmentFence, time.Time) error
ExpireRunner(context.Context, string, time.Time) error
Snapshot(context.Context, string) (Snapshot, error)
}
Boundary exposes the durable control-plane behavior qualified by the reusable suite.
type BoundaryFactory ¶
BoundaryFactory creates isolated durable state for one conformance case.
type FakeRunner ¶
type FakeRunner struct {
RunnerID string
PoolName string
ConnectionID string
// contains filtered or unexported fields
}
FakeRunner produces canonical runner frames with stable identity and connection-local ordering.
func NewFakeRunner ¶
func NewFakeRunner(runnerID, poolName, connectionID string) *FakeRunner
func (*FakeRunner) AssignmentReady ¶
func (runner *FakeRunner) AssignmentReady( fence *runnerv1.AssignmentFence, ) *runnerv1.RunnerToControlPlane
func (*FakeRunner) Heartbeat ¶
func (runner *FakeRunner) Heartbeat(phase runnerv1.DrainPhase) *runnerv1.RunnerToControlPlane
func (*FakeRunner) Hello ¶
func (runner *FakeRunner) Hello(minimum, maximum uint32) *runnerv1.RunnerToControlPlane
func (*FakeRunner) Reconnect ¶
func (runner *FakeRunner) Reconnect(connectionID string)
func (*FakeRunner) Registration ¶
func (runner *FakeRunner) Registration() *runnerv1.RunnerToControlPlane
func (*FakeRunner) ReorderedAssignmentReady ¶
func (runner *FakeRunner) ReorderedAssignmentReady( fence *runnerv1.AssignmentFence, sequence uint64, ) *runnerv1.RunnerToControlPlane
func (*FakeRunner) ReplayLast ¶
func (runner *FakeRunner) ReplayLast() (*runnerv1.RunnerToControlPlane, error)
type Snapshot ¶
type Snapshot struct {
RunnerState string
DrainPhase string
VCPUCount int64
MemoryBytes int64
DiskBytes int64
Instances int64
Operations int64
ActiveConnectionID string
AssignmentState string
MayReassign bool
}
Snapshot is bounded durable evidence used by cross-implementation assertions.
Click to show internal directories.
Click to hide internal directories.