Versions in this module Expand all Collapse all v1 v1.0.1 Aug 8, 2022 v1.0.0 Aug 4, 2022 Changes in this version + const CurrentAPIVersion + var DefaultEventTimeout = 3 * time.Second + var ResponseTypeToName = map[ResponseType]string + type API struct + Config Config + Events chan *Event + func New(opts ...Option) (*API, error) + func (a *API) List(ctx xcontext.Context, requestor EventRequestor, query *storage.JobQuery) (Response, error) + func (a *API) Retry(ctx xcontext.Context, requestor EventRequestor, jobID types.JobID) (Response, error) + func (a *API) SendEvent(ev *Event, timeout *time.Duration) error + func (a *API) SendReceiveEvent(ev *Event, timeout *time.Duration) (*EventResponse, error) + func (a *API) Start(ctx xcontext.Context, requestor EventRequestor, jobDescriptor string) (Response, error) + func (a *API) Status(ctx xcontext.Context, requestor EventRequestor, jobID types.JobID) (Response, error) + func (a *API) Stop(ctx xcontext.Context, requestor EventRequestor, jobID types.JobID) (Response, error) + func (a API) ServerID() string + func (a API) Version() Response + type Config struct + EventTimeout time.Duration + ServerIDFunc ServerIDFunc + type Event struct + Context xcontext.Context + Err error + Msg EventMsg + RespCh chan *EventResponse + ServerID string + Type EventType + type EventListMsg struct + Query *storage.JobQuery + func (e EventListMsg) Requestor() EventRequestor + type EventListResponse struct + Err error + Jobs []types.JobID + Requestor EventRequestor + type EventMsg interface + Requestor func() EventRequestor + type EventRequestor string + type EventResponse struct + Err error + JobID types.JobID + JobIDs []types.JobID + Requestor EventRequestor + Status *job.Status + type EventRetryMsg struct + JobID types.JobID + func (e EventRetryMsg) Requestor() EventRequestor + type EventStartMsg struct + JobDescriptor string + NumRuns uint32 + TestID string + func (e EventStartMsg) Requestor() EventRequestor + type EventStatusMsg struct + JobID types.JobID + func (e EventStatusMsg) Requestor() EventRequestor + type EventStopMsg struct + JobID types.JobID + func (e EventStopMsg) Requestor() EventRequestor + type EventType uint16 + const EventTypeError + const EventTypeList + const EventTypeRetry + const EventTypeStart + const EventTypeStatus + const EventTypeStop + func (e EventType) String() string + type ListResponse struct + Data ResponseDataList + Err *xjson.Error + ServerID string + type Listener interface + Serve func(xcontext.Context, *API) error + type Option interface + Apply func(*Config) + type OptionEventTimeout time.Duration + func (opt OptionEventTimeout) Apply(config *Config) + type OptionServerID string + func (opt OptionServerID) Apply(config *Config) + type Response struct + Data ResponseData + Err error + ServerID string + Type ResponseType + type ResponseData interface + Type func() ResponseType + type ResponseDataList struct + JobIDs []types.JobID + func (r ResponseDataList) Type() ResponseType + type ResponseDataRetry struct + JobID types.JobID + NewJobID types.JobID + func (r ResponseDataRetry) Type() ResponseType + type ResponseDataStart struct + JobID types.JobID + func (r ResponseDataStart) Type() ResponseType + type ResponseDataStatus struct + Status *job.Status + func (r ResponseDataStatus) Type() ResponseType + type ResponseDataStop struct + func (r ResponseDataStop) Type() ResponseType + type ResponseDataVersion struct + Version uint32 + func (r ResponseDataVersion) Type() ResponseType + type ResponseType int32 + const ResponseTypeList + const ResponseTypeRetry + const ResponseTypeStart + const ResponseTypeStatus + const ResponseTypeStop + const ResponseTypeVersion + type RetryResponse struct + Data ResponseDataRetry + Err *xjson.Error + ServerID string + type ServerIDFunc func() string + type StartResponse struct + Data ResponseDataStart + Err *xjson.Error + ServerID string + type StatusResponse struct + Data ResponseDataStatus + Err *xjson.Error + ServerID string + type StopResponse struct + Data ResponseDataStop + Err *xjson.Error + ServerID string + type VersionResponse struct + Data ResponseDataVersion + Err *xjson.Error + ServerID string