...

Package parallel_support

import "github.com/onsi/ginkgo/v2/internal/parallel_support"
Overview
Index

Overview ▾

Index ▾

Variables
type BeforeSuiteState
type Client
    func NewClient(serverHost string) Client
type ParallelIndexCounter
type RPCServer
    func (server *RPCServer) Address() string
    func (server *RPCServer) Close()
    func (server *RPCServer) GetOutputDestination() io.Writer
    func (server *RPCServer) GetSuiteDone() chan interface{}
    func (server *RPCServer) RegisterAlive(node int, alive func() bool)
    func (server *RPCServer) SetOutputDestination(w io.Writer)
    func (server *RPCServer) Start()
type Server
    func NewServer(parallelTotal int, reporter reporters.Reporter) (Server, error)
type ServerHandler
    func (handler *ServerHandler) Abort(_ Void, _ *Void) error
    func (handler *ServerHandler) AggregatedNonprimaryProcsReport(_ Void, report *types.Report) error
    func (handler *ServerHandler) BeforeSuiteCompleted(beforeSuiteState BeforeSuiteState, _ *Void) error
    func (handler *ServerHandler) BeforeSuiteState(_ Void, beforeSuiteState *BeforeSuiteState) error
    func (handler *ServerHandler) Counter(_ Void, counter *int) error
    func (handler *ServerHandler) DidRun(report types.SpecReport, _ *Void) error
    func (handler *ServerHandler) EmitOutput(output []byte, n *int) error
    func (handler *ServerHandler) EmitProgressReport(report types.ProgressReport, _ *Void) error
    func (handler *ServerHandler) HaveNonprimaryProcsFinished(_ Void, _ *Void) error
    func (handler *ServerHandler) ReportBeforeSuiteCompleted(reportBeforeSuiteState types.SpecState, _ *Void) error
    func (handler *ServerHandler) ReportBeforeSuiteState(_ Void, reportBeforeSuiteState *types.SpecState) error
    func (handler *ServerHandler) ShouldAbort(_ Void, shouldAbort *bool) error
    func (handler *ServerHandler) SpecSuiteDidEnd(report types.Report, _ *Void) error
    func (handler *ServerHandler) SpecSuiteWillBegin(report types.Report, _ *Void) error
type Void

Package files

client_server.go http_client.go http_server.go rpc_client.go rpc_server.go server_handler.go

Variables

var ErrorEarly = fmt.Errorf("early")
var ErrorFailed = fmt.Errorf("failed")
var ErrorGone = fmt.Errorf("gone")
var POLLING_INTERVAL = 50 * time.Millisecond

type BeforeSuiteState

type BeforeSuiteState struct {
    Data  []byte
    State types.SpecState
}

type Client

type Client interface {
    Connect() bool
    Close() error

    PostSuiteWillBegin(report types.Report) error
    PostDidRun(report types.SpecReport) error
    PostSuiteDidEnd(report types.Report) error
    PostReportBeforeSuiteCompleted(state types.SpecState) error
    BlockUntilReportBeforeSuiteCompleted() (types.SpecState, error)
    PostSynchronizedBeforeSuiteCompleted(state types.SpecState, data []byte) error
    BlockUntilSynchronizedBeforeSuiteData() (types.SpecState, []byte, error)
    BlockUntilNonprimaryProcsHaveFinished() error
    BlockUntilAggregatedNonprimaryProcsReport() (types.Report, error)
    FetchNextCounter() (int, error)
    PostAbort() error
    ShouldAbort() bool
    PostEmitProgressReport(report types.ProgressReport) error
    Write(p []byte) (int, error)
}

func NewClient

func NewClient(serverHost string) Client

type ParallelIndexCounter

type ParallelIndexCounter struct {
    Index int
}

type RPCServer

RPCServer spins up on an automatically selected port and listens for communication from the forwarding reporter. It then forwards that communication to attached reporters.

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

func (*RPCServer) Address

func (server *RPCServer) Address() string

The address the server can be reached it. Pass this into the `ForwardingReporter`.

func (*RPCServer) Close

func (server *RPCServer) Close()

Stop the server

func (*RPCServer) GetOutputDestination

func (server *RPCServer) GetOutputDestination() io.Writer

func (*RPCServer) GetSuiteDone

func (server *RPCServer) GetSuiteDone() chan interface{}

func (*RPCServer) RegisterAlive

func (server *RPCServer) RegisterAlive(node int, alive func() bool)

func (*RPCServer) SetOutputDestination

func (server *RPCServer) SetOutputDestination(w io.Writer)

func (*RPCServer) Start

func (server *RPCServer) Start()

Start the server. You don't need to `go s.Start()`, just `s.Start()`

type Server

type Server interface {
    Start()
    Close()
    Address() string
    RegisterAlive(node int, alive func() bool)
    GetSuiteDone() chan interface{}
    GetOutputDestination() io.Writer
    SetOutputDestination(io.Writer)
}

func NewServer

func NewServer(parallelTotal int, reporter reporters.Reporter) (Server, error)

type ServerHandler

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

func (*ServerHandler) Abort

func (handler *ServerHandler) Abort(_ Void, _ *Void) error

func (*ServerHandler) AggregatedNonprimaryProcsReport

func (handler *ServerHandler) AggregatedNonprimaryProcsReport(_ Void, report *types.Report) error

func (*ServerHandler) BeforeSuiteCompleted

func (handler *ServerHandler) BeforeSuiteCompleted(beforeSuiteState BeforeSuiteState, _ *Void) error

func (*ServerHandler) BeforeSuiteState

func (handler *ServerHandler) BeforeSuiteState(_ Void, beforeSuiteState *BeforeSuiteState) error

func (*ServerHandler) Counter

func (handler *ServerHandler) Counter(_ Void, counter *int) error

func (*ServerHandler) DidRun

func (handler *ServerHandler) DidRun(report types.SpecReport, _ *Void) error

func (*ServerHandler) EmitOutput

func (handler *ServerHandler) EmitOutput(output []byte, n *int) error

func (*ServerHandler) EmitProgressReport

func (handler *ServerHandler) EmitProgressReport(report types.ProgressReport, _ *Void) error

func (*ServerHandler) HaveNonprimaryProcsFinished

func (handler *ServerHandler) HaveNonprimaryProcsFinished(_ Void, _ *Void) error

func (*ServerHandler) ReportBeforeSuiteCompleted

func (handler *ServerHandler) ReportBeforeSuiteCompleted(reportBeforeSuiteState types.SpecState, _ *Void) error

func (*ServerHandler) ReportBeforeSuiteState

func (handler *ServerHandler) ReportBeforeSuiteState(_ Void, reportBeforeSuiteState *types.SpecState) error

func (*ServerHandler) ShouldAbort

func (handler *ServerHandler) ShouldAbort(_ Void, shouldAbort *bool) error

func (*ServerHandler) SpecSuiteDidEnd

func (handler *ServerHandler) SpecSuiteDidEnd(report types.Report, _ *Void) error

func (*ServerHandler) SpecSuiteWillBegin

func (handler *ServerHandler) SpecSuiteWillBegin(report types.Report, _ *Void) error

type Void

type Void struct{}