Agents Module

Types

Type Description

imageMessage

Represents a message type that can either contain an image or an end-of-stream signal, which is used with an asynchronous reply channel

pathMessage

Represents a message type encapsulated either a string path or an end-of-stream message, which is used with an asynchronous reply channel

Functions and values

Function or value Description

imageFullProcessor imageEditor outputDirectory

Full Usage: imageFullProcessor imageEditor outputDirectory

Parameters:
    imageEditor : MyImage -> 'a - The image editing function to apply to the loaded images
    outputDirectory : string - The directory where the edited images will be saved

Returns: MailboxProcessor<pathMessage>

Creates an image processing and saving MailboxProcessor that continuously receives path messages from an input mailbox. It loads, edits, and saves images to the specified output directory

imageEditor : MyImage -> 'a

The image editing function to apply to the loaded images

outputDirectory : string

The directory where the edited images will be saved

Returns: MailboxProcessor<pathMessage>

imageProcessor imageEditor receiver

Full Usage: imageProcessor imageEditor receiver

Parameters:
    imageEditor : MyImage -> 'a - The image editing function to apply to incoming images
    receiver : MailboxProcessor<imageMessage> - The MailboxProcessor that receives the processed images

Returns: MailboxProcessor<imageMessage>

Defines an image processing agent that listens to image-messages and applies the given function

imageEditor : MyImage -> 'a

The image editing function to apply to incoming images

receiver : MailboxProcessor<imageMessage>

The MailboxProcessor that receives the processed images

Returns: MailboxProcessor<imageMessage>

imageSaver outputDirectory

Full Usage: imageSaver outputDirectory

Parameters:
    outputDirectory : string - The directory where the images will be saved

Returns: MailboxProcessor<imageMessage>

Defines an image saver agent that listens to image-messages and saves them to a specified output directory

outputDirectory : string

The directory where the images will be saved

Returns: MailboxProcessor<imageMessage>

logger

Full Usage: logger

Returns: MailboxProcessor<string>

Represents a logger, which receives messages and prints them to the console

Returns: MailboxProcessor<string>