package
1.0.1
Repository: https://github.com/linuxboot/contest.git
Documentation: pkg.go.dev

# Functions

New returns an initialized instance of an API struct with the specified server ID generation function.

# Constants

CurrentAPIVersion is the current version of the API that the clients must be able to speak in order to communicate with the server.
list of existing API event types.
list of existing API event types.
list of existing API event types.
list of existing API event types.
list of existing API event types.
list of existing API event types.
The various response types used in the Response struct.
The various response types used in the Response struct.
The various response types used in the Response struct.
The various response types used in the Response struct.
The various response types used in the Response struct.
The various response types used in the Response struct.

# Variables

DefaultEventTimeout is the default time to wait for sending or receiving an event on the events channel.
ResponseTypeToName maps response types to their names.

# Structs

The API structure implements the communication between clients and the JobManager.
Config is a set of knobs to change the behavior of API processing.
Event represents an event that the API can generate.
EventListMsg contains the arguments for an event of type List.
EventListResponse is a response to EventListMsg.
EventResponse is a response to an EventMsg.
EventRetryMsg contains the arguments for an event of type Retry.
EventStartMsg contains the arguments for an event of type Start.
EventStatusMsg contains the arguments for an event of type Status.
EventStopMsg contains the arguments for an event of type Stop.
ListResponse is a typesafe version of Response with a List payload.
Response is the type returned to any API request.
ResponseDataList is the response type for a List request.
ResponseDataRetry is the response type for a Retry request.
ResponseDataStart is the response type for a Start request.
ResponseDataStatus is the response type for a Status request.
ResponseDataStop is the response type for a Stop request.
ResponseDataVersion is the response type for a Version request.
RetryResponse is a typesafe version of Response with a Status payload.
StartResponse is a typesafe version of Response with a Status payload.
StatusResponse is a typesafe version of Response with a Status payload.
StopResponse is a typesafe version of Response with a Status payload.
VersionResponse is a typesafe version of Response with a Status payload.

# Interfaces

EventMsg defines various event messages for different event types.
Listener defines the interface for an API listener.
Option is an additional argument to method New to change the behavior of API processing.
ResponseData is the interface type implemented by the various response types.

# Type aliases

EventRequestor identifies who is sending a request.
EventType identifies an API event type.
OptionEventTimeout defines time duration for API request to be processed.
OptionServerID defines a custom server ID in API responses.
ResponseType defines the storage type of a response type.
ServerIDFunc is used to return a custom server ID in api responses.