import { MessageBroker } from "./message_broker" ; export interface Configuration { taskCompression ? : "gzip" | "zlib" ; taskProtocol ? : 2 ; taskSerializer ? : "json" | "yaml" ; taskIgnoreResult ? : boolean ; taskTimeLimit ? : number ; taskSoftTimeLimit ? : number ; resultBackend ? : string ; resultBackendTransportOptions ? : { [ key ] : any | undefined ; } ; resultSerializer ? : "json" | "yaml" ; resultCompression ? : "gzip" | "zlib" ; resultExpires ? : number ; resultPersistent ? : boolean ; redisBackendUseSsl ? : SslOptions ; taskDefaultQueue ? : string ; taskDefaultDeliveryMode ? : "persistent" | "transient" ; brokerUrl ? : string | Array < string > ; brokerFailoverStrategy ? : "round-robin" | "shuffle" | FailoverStrategy ; brokerUseSsl ? : SslOptions ; brokerTransportOptions ? : { [ key ] : any | undefined ; } ; } export const DEFAULT_CONFIG = { brokerFailoverStrategy : "round-robin" , brokerUrl : "amqp://localhost" , resultPersistent : false , resultSerializer : "json" , taskDefaultDeliveryMode : "persistent" , taskDefaultQueue : "celery" , taskIgnoreResult : false , taskProtocol : 2 , taskSerializer : "json" , } ; export type ContentType = "json" | "yaml" | "application/json" | "application/x-yaml" ; export type FailoverStrategy = ( brokers : Array < MessageBroker > ) => MessageBroker ; export interface SslOptions { keyfile ? : string ; certfile ? : string ; caCerts ? : string ; certReqs : CertificationRequirement ; } export enum CertificationRequirement { None , Optional , Required }