Module chewdata::step::reader

source ·
Expand description

Read the content of a crate::document through a crate::connector.

§Actions

1 - Get a crate::Context from the input queue.
2 - Extract the crate::DataResult from the crate::Context.
3 - Put the data in the parameter of the crate::connector.
4 - Read bytes from the crate::document through the crate::connector.
5 - Create a new crate::Context and attach the crate::DataResult to it.
6 - Push the new crate::Context into the output queue.
7 - Go to step 1 until the input queue is not empty.

§Configuration

keyaliasDescriptionDefault ValuePossible Values
type-Required in order to use reader stepreaderreader / read / r
connector_typeconn / connectorConnector type to use in order to read a resourceioSee crate::connector
document_typedoc / documentDocument type to use in order to manipulate the resourcejsonSee crate::document
namealiasStep namenullAuto generate alphanumeric value
data_typedataType of data the reader push in the queue : [ ok / err ]okok / err
concurrency_limit-Limit of steps to run in concurrence.1unsigned number

§Examples

[
    {
        "type": "reader",
        "name": "read_a",
        "connector": {
            "type": "io"
        },
        "document": {
            "type": "json"
        },
        "data_type": "ok",
        "concurrency_limit": 1
    }
    ...
]

Structs§