Skip to content

Kyo͞o

Classes

ClassDescription
AMQPErrorAn error, can be both AMQP level errors or socket errors
KyooAMQPChannelErrorThe error thrown by the amqp adapter's channel
KyooBullMQNativeWorkerRanErrorThe error thrown when the data from the broker cannot be coercced into an EnqueueableKyooJob
KyooCleanupFailedErrorThe error thrown when the data from the broker cannot be coercced into an EnqueueableKyooJob
KyooConnectionThe main class for interacting with a Queue Broker.
KyooInvalidBrokerPayloadErrorThe error thrown when the data from the broker cannot be coercced into an EnqueueableKyooJob
KyooInvalidConfigurationErrorThe error thrown when the Kyoo connection configuration passed is not valid
KyooInvalidFetchCountErrorThe error thrown when "count" argument for the KyooQueue.jobs.fetch method is invalid
KyooNoackErrorThe error thrown when Kyoo fails to automatically disposition a job as acknowledged
KyooNotConnectedErrorRepresents an error which is thrown when attempting to call the enqueue method while the connection to the queue broker is not established.
KyooNothingToEnqueueErrorRepresents an error which is thrown when attempting to call the enqueue method without a job
KyooQueueAn instance of a queue created by Kyoo with the queue broker. A queue is created by calling the get method of KyooConnection.queues
KyooTerminatedWorkerErrorThe error thrown when the data from the broker cannot be coercced into an EnqueueableKyooJob
KyooUnacceptableWorkerOptionsErrorRepresents an error which is thrown when attempting to create a worker with invalid options.
KyooUnenqueueableErrorThe error thrown when attempting to add a job with an invalid configuration
KyooWorkerThe class responsible for receiving and processing jobs from a queue. A worker can be created by using KyooQueue.worker.

Interfaces

InterfaceDescription
AMQPAdapterConfigurationDescribes the shape of the object used to configure the AMQP adapter.
AMQPClientOptionsObjectDescribes the shape of an object used for connecting to an AMQP server.
BullMQAdapterConfigurationDescribes the overall shape of the configuration which should be passed to the BullMQ adapter.
BullMQRedisConnectionExtraOptionsDescribes additional options which are used to configure the BullMQ adapter.
KyooConfigurationKyooConfiguration is a generic type that represents the configuration for a specific queue adapter. It includes the adapter type and its corresponding configuration, as well as Kyoo-specific options.
KyooConfigurationOptionsOptions for Kyoo behavior which is not related to an adapter.
KyooConnectionEventsDescribes the events and their callbacks for a KyooConnection instance
KyooJobA job is a unit of work that can be processed by a worker. It contains a payload and optional metadata.
KyooJobAckShape of the job acknowledgment function.
KyooJobMessageDescribes the shape of the object that is passed to the job processor function.
KyooJobNackShape of the job negative acknowledgment function.
KyooJobProcessorDescribes the shape of a function which is used in the KyooWorker class to process jobs.
KyooJobToEnqueueDescribes the shape of a job which should be enqueued.
KyooQueueWorkerOptionsRepresents the options for the creation of a queue worker
KyooWorkableA workable job is a job that can be processed by a worker. It contains the job and methods for acknowledging or rejecting the job.
KyooWorkerControlsAn object containing the controls for the worker.
KyooWorkerDispositionersAn object containing the dispositioners for the job.
KyooWorkerEventsDescribes the events and their callbacks for a KyooWorker instance
SQSAdapterConfigurationThe configuration interface of SQSClient class constructor that set the region, credentials and other options.

Type Aliases

Type AliasDescription
AMQPUrlA URL using either the "amqp" or "amqps" protocol.
ConnectionStatusA string literal type representing the connection status of the adapter. It can be one of the following values: - "connected": The adapter is connected and ready to use. - "disconnected": The adapter is not connected. - "connecting": The adapter is in the process of connecting.
KyooClientKyooClient is a union type representing the supported queue adapters in the Kyoo library. The possible choices are amqp, bullmq and sqs.
KyooJobPriorityDefines the possible job priority values. The priority is a number between 1 and 255. The higher the number, the higher the priority.
KyooPrimitiveDefines the union of all serializable primitive types.
KyooSerializableDefines all the types which can be be serialized
KyooTypedArrayDefines a union for all the serializable typed arrays.

Variables

VariableDescription
canSerializeChecks if a value is serializable
versionThe current version of the Kyoo library.

Functions

FunctionDescription
defineAdapterConfigurationValidates, sanitizes, and returns the configuration object for the adapter.
isAKyooWorkerChecks if the given object is an instance of KyooWorker
isKyooQueueChecks if the given object is an instance of KyooQueue