Class WranglerSpec

java.lang.Object
dev.gmitch215.bytebox.gradle.WranglerSpec

public abstract class WranglerSpec extends Object
The wrangler { } block: what goes into the generated configuration.
Since:
1.0.0
  • Constructor Details

    • WranglerSpec

      public WranglerSpec()
  • Method Details

    • getName

      public abstract org.gradle.api.provider.Property<String> getName()
      Returns the Worker's name.
      Returns:
      the Worker's name
    • getCompatibilityDate

      public abstract org.gradle.api.provider.Property<String> getCompatibilityDate()
      Returns the compatibility date.

      Validated at build time for format and for a real calendar date, and checked against the installed Wrangler by buildWorker, which is the only thing that knows which dates its runtime supports.

      Returns:
      the compatibility date
    • getCompatibilityFlags

      public abstract org.gradle.api.provider.ListProperty<String> getCompatibilityFlags()
      Returns the compatibility flags.
      Returns:
      the compatibility flags
    • getRoutes

      public abstract org.gradle.api.provider.ListProperty<String> getRoutes()
      Returns the routes this Worker answers on.
      Returns:
      the routes this Worker answers on
    • getCrons

      public abstract org.gradle.api.provider.ListProperty<String> getCrons()
      Returns the Cron Triggers that fire it.
      Returns:
      the Cron Triggers that fire it
    • getTailConsumers

      public abstract org.gradle.api.provider.ListProperty<String> getTailConsumers()
      Returns the Workers this one sends its logs to.
      Returns:
      the Workers this one sends its logs to
    • getObservability

      public abstract org.gradle.api.provider.Property<Boolean> getObservability()
      Returns whether to send logs to Cloudflare's observability.
      Returns:
      whether to send logs to Cloudflare's observability
    • routes

      public void routes(String... routes)
      Adds routes.
      Parameters:
      routes - the routes
    • crons

      public void crons(String... crons)
      Adds Cron Triggers.

      An account gets 5 on the free plan and 250 on paid, counted across every Worker rather than per Worker.

      Parameters:
      crons - the cron expressions
    • compatibilityFlags

      public void compatibilityFlags(String... flags)
      Adds compatibility flags.
      Parameters:
      flags - the flags
    • tailConsumers

      public void tailConsumers(String... workers)
      Adds tail consumers.
      Parameters:
      workers - the Workers to send logs to