func NewFutureTask(callback Callback) *FutureTask {
	return &FutureTask{Callback: callback}
}
Use this method to create a new task. It takes a callback in the form of a closure.
package rio
import (
	"context"
	"errors"
	"fmt"
	"log"
	"time"
)
type FutureTaskResponse struct {
	ResponseCode int
	Data         interface{}
	Error        error
}
var EMPTY_ARG_PLACEHOLDER = ""
var EMPTY_CALLBACK_RESPONSE = &FutureTaskResponse{
	ResponseCode: -1,
	Data:         nil,
	Error:        errors.New("The callback didn't run due to argument unavailability"),
}
type FutureTask struct {
	Name         string
	Callback     Callback
	Timeout      time.Duration
	RetryCount   int
	ReplicaCount int
}
type Bridge func(interface{}) *BridgeConnection
type Callback func(*BridgeConnection) *FutureTaskResponse
type BridgeConnection struct {
	Data  []interface{}
	Error error
}
type Request struct {
	Tasks            []*FutureTask
	Bridges          []Bridge
	Responses        []*Response
	CompletedChannel chan bool
	Ctx              context.Context
}
type Response struct {
	ResponseTime time.Duration
	ResponseCode int
	Data         interface{}
	Error        error
}
func (r *Request) GetResponse(index int) (*Response, error) {
	if r.Responses != nil && len(r.Responses) > 0 {
		if index > len(r.Responses)-1 {
			return nil, errors.New(fmt.Sprintf("No response available at index position : %d", index))
		} else {
			return r.Responses[index], nil
		}
	} else {
		return nil, errors.New("No response obtained from the process, the response slice is empty.")
	}
}
func (r *Request) GetOnlyResponse() (*Response, error) {
	if len(r.Responses) > 0 {
		return r.Responses[0], nil
	} else {
		return nil, errors.New("No response obtained from the process, the response slice is empty.")
	}
}