Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Antfarm

Expose Antfarm.

Hierarchy

  • Antfarm

Index

Constructors

constructor

Properties

Protected e

Methods

createAutoFolderNest

  • Factory method which returns an AutoFolderNest. If the auto managed directory does not exist, it is created.

    Parameters

    • hierarchy: string | string[]

      Path of the folder as a string or an array of strings as path segments.

    Returns AutoFolderNest

    Example

    af.createAutoFolderNest("outfolder")
    // /Users/dominick/My Automanaged Directory/outfolder
    

    Example

    af.createAutoFolderNest(["proofing", "others"])
    // /Users/dominick/My Automanaged Directory/proofing/others
    

createFolderNest

  • createFolderNest(path?: string, allowCreate?: boolean): FolderNest
  • Factory method which returns a FolderNest.

    Parameters

    • Optional path: string

      Path of the folder.

    • Default value allowCreate: boolean = false

      Optional boolean flag to allow creation of folder if it does not exist.

    Returns FolderNest

createFtpNest

  • createFtpNest(host: string, port?: number, username?: string, password?: string, checkEvery?: number): FtpNest
  • Factory method which returns an FtpNest.

    Parameters

    • host: string

      Hostname or IP address of the FTP server.

    • Default value port: number = 21

      Port number of the FTP server.

    • Default value username: string = ""

      FTP account username.

    • Default value password: string = ""

      FTP account password.

    • Default value checkEvery: number = 10

      Frequency of re-checking FTP in minutes.

    Returns FtpNest

createS3Nest

  • createS3Nest(bucket: string, keyPrefix?: string, checkEvery?: number, allowCreation?: boolean): S3Nest
  • Factory method to create and return an S3 nest.

    Parameters

    • bucket: string
    • Optional keyPrefix: string
    • Default value checkEvery: number = 5
    • Default value allowCreation: boolean = false

    Returns S3Nest

createTunnel

  • createTunnel(name: any): Tunnel

createWebhookNest

  • createWebhookNest(path: string | string[], httpMethod?: string, handleRequest?: any): WebhookNest
  • Factory method which returns a WebhookNest.

    Parameters

    • path: string | string[]

      The path which is generated in the webhook's route. You can supply a string or array of strings.

    • Default value httpMethod: string = "all"

      HTTP method for this webhook. Choose "all" for any HTTP method.

    • Optional handleRequest: any

      Optional callback function to handle the request, for sending a custom response.

    Returns WebhookNest

    Example

    var webhook = af.createWebhookNest(["proof", "create"], "post");
    

    Example returning custom response

    var webhook = af.createWebhookNest(["proof", "create"], "post", function(req, res, job, nest){
        res.setHeader("Content-Type", "application/json; charset=utf-8");
        res.end(JSON.stringify({
             job_name: job.getName(),
             job_id: job.getId(),
             message: "Proof created!"
        }));
    });
    

loadDir

  • loadDir(directory: string): void
  • Load an entire directory of workflow modules.

    Parameters

    • directory: string

      Path to the workflow modules.

    Returns void

log

  • log(type: number, message: string, actor?: any, instances?: Array<any>): void
  • Log messages into the antfarm logger.

    Parameters

    • type: number
    • message: string
    • Optional actor: any
    • Default value instances: Array<any> = []

    Returns void

version

  • version(): string

Generated using TypeDoc