CrossClj

0.2.3 docs

SourceDocs



RECENT
    VARS
    endpoint<
    endpoint>
    IChannelEndpoint

    « Index of all namespaces of this project

    Facilities to connect an IQueueEndpoint to core.async channels.
    
    The IChannelEndpoint protocol defines the capability to provide
    core.async endpoints for enqueueing and dequeueing messages on the
    underlying endpoint. It is initially intended to be built on top
    of an IQueueEndpoint, but other mechanisms are possible.
    
     Helper methods are provided to perform the connection.
     Given an IQueueEndpoint and an async channel, endpoint> takes
     messages from the endpoint and places them on the
     channel. endpoint< takes messages from the channel and places
     them on the endpoint.
    (endpoint< endpoint)(endpoint< endpoint concurrency)
    Given a source IQueueEndpoint, creates a core.async channel and
    connects them so that messages received on the IQueueEndpoint are
    placed onto the core.async channel in a go block. Returns the new
    channel.
    
    If concurrency is given, uses that many threads to process messages
    coming in from the endpoint.
    
    Replaces any previous listener function attached to the endpoint.
    
    The listener will unregister itself if its channel is closed.
    (endpoint> endpoint & send-options)
    Given a target IQueueEndpoint, creates a core.async channel and
    connects them so that messages received on the core.async channel
    are placed onto the target IQueueEndpoint in a background thread.
    Returns the new channel.
    
    Send-options will be supplied to Bureaucrat's send! function. This
    can be used to e.g. supply a ttl for the messages.
    protocol
    The IChannelEndpoint protocol defines the capability to provide
    core.async endpoints for transmitting and receiving messages to the
    same underlying endpoint. It is initially intended to be built on top
    of an IQueueEndpoint, but other mechanisms are possible.
    
    Implementations should not actually preconnect any core.async channels
    until the corresponding method is actually called. For example, an
    IQueueEndpoint whose purpose is to transmit to remote systems would
    not work very well if all messages written to it were immediately
    dequeued onto a local async channel!
    (dequeue-channel component)
    Returns a core.async channel where messages received on the underlying endpoint will be placed.
    
    (enqueue-channel component)
    Returns a core.async channel whose contents will be placed onto the underlying endpoint's queue.