Skip to content

Commit

Permalink
micron: README: updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
zalgonoise committed Apr 15, 2024
1 parent 37e7559 commit 8c66848
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ func New(options ...cfg.Option[*Config]) (Runtime, error)

Below is a table with all the options available for creating a cron runtime:

| Function | Input Parameters | Description |
|:---------------------------------------------:|:--------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| [`WithSelector`](./cron_config.go#L33) | [`sel selector.Selector`](./selector/selector.go#L37) | Configures the with the input [`selector.Selector`](./selector/selector.go#L37). |
| Function | Input Parameters | Description |
|:---------------------------------------------:|:--------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| [`WithSelector`](./cron_config.go#L33) | [`sel selector.Selector`](./selector/selector.go#L37) | Configures the with the input [`selector.Selector`](./selector/selector.go#L37). |
| [`WithJob`](./cron_config.go#L55) | `id string`, `cron string`, [`runners ...executor.Runner`](./executor/executor.go#L41) | Adds a new [`executor.Executor`](./executor/executor.go#L85) to the [`Runtime`](./cron.go#L34) configuration from the input ID, cron string and set of [`executor.Runner`](./executor/executor.go#L41). |
| [`WithErrorBufferSize`](./cron_config.go#L85) | `size int` | Defines the capacity of the error channel that the [`Runtime`](./cron.go#L34) exposes in its [`Runtime.Err`](./cron.go#L77) method. |
| [`WithMetrics`](./cron_config.go#L98) | [`m cron.Metrics`](./cron_with_metrics.go#L10) | Decorates the [`Runtime`](./cron.go#L34) with the input metrics registry. |
| [`WithLogger`](./cron_config.go#L111) | [`logger *slog.Logger`](https://pkg.go.dev/log/slog#Logger) | Configures the [`Runtime`](./cron.go#L34) with the input logger. |
| [`WithLogHandler`](./cron_config.go#L124) | [`handler slog.Handler`](https://pkg.go.dev/log/slog#Handler) | Configures the [`Runtime`](./cron.go#L34) with logging using the input log handler. |
| [`WithTrace`](./cron_config.go#L137) | [`tracer trace.Tracer`](https://pkg.go.dev/go.opentelemetry.io/otel/trace#Tracer) | Configures the [`Runtime`](./cron.go#L34) with the input trace.Tracer. |
| [`WithErrorBufferSize`](./cron_config.go#L85) | `size int` | Defines the capacity of the error channel that the [`Runtime`](./cron.go#L34) exposes in its [`Runtime.Err`](./cron.go#L77) method. |
| [`WithMetrics`](./cron_config.go#L98) | [`m cron.Metrics`](./cron_with_metrics.go#L10) | Configures the [`Runtime`](./cron.go#L34) with the input metrics registry. |
| [`WithLogger`](./cron_config.go#L111) | [`logger *slog.Logger`](https://pkg.go.dev/log/slog#Logger) | Configures the [`Runtime`](./cron.go#L34) with the input logger. |
| [`WithLogHandler`](./cron_config.go#L124) | [`handler slog.Handler`](https://pkg.go.dev/log/slog#Handler) | Configures the [`Runtime`](./cron.go#L34) with logging using the input log handler. |
| [`WithTrace`](./cron_config.go#L137) | [`tracer trace.Tracer`](https://pkg.go.dev/go.opentelemetry.io/otel/trace#Tracer) | Configures the [`Runtime`](./cron.go#L34) with the input trace.Tracer. |

The simplest possible cron runtime could be the result of a call to [`cron.New`](./cron.go#L87) with a single
[`cron.WithJob`](./cron_config.go#L55) option. This creates all the components that a cron runtime needs with the most
Expand Down Expand Up @@ -162,10 +162,10 @@ Below is a table with all the options available for creating a cron job selector
| [`WithExecutors`](./selector/selector_config.go#L27) | [`executors ...executor.Executor`](./executor/executor.go#L85) | Configures the [`Selector`](./selector/selector.go#L37) with the input [`executor.Executor`(s)](./executor/executor.go#L85). |
| [`WithBlock`](./selector/selector_config.go#L62) | | Configures the [`Selector`](./selector/selector.go#L37) to block (wait) for the underlying [`executor.Executor`(s)](./executor/executor.go#L85) to complete the task. |
| [`WithTimeout`](./selector/selector_config.go#L75) | `dur time.Duration` | Configures a (non-blocking) [`Selector`](./selector/selector.go#L37) to wait a certain duration before detaching of the executable task, before continuing to select the next one. |
| [`WithMetrics`](./selector/selector_config.go#L88) | [`m selector.Metrics`](./selector/selector_with_metrics.go#L10) | Decorates the [`Selector`](./selector/selector.go#L37) with the input metrics registry. |
| [`WithLogger`](./selector/selector_config.go#L101) | [`logger *slog.Logger`](https://pkg.go.dev/log/slog#Logger) | Decorates the [`Selector`](./selector/selector.go#L37) with the input logger. |
| [`WithLogHandler`](./selector/selector_config.go#L114) | [`handler slog.Handler`](https://pkg.go.dev/log/slog#Handler) | Decorates the [`Selector`](./selector/selector.go#L37) with logging using the input log handler. |
| [`WithTrace`](./selector/selector_config.go#L127) | [`tracer trace.Tracer`](https://pkg.go.dev/go.opentelemetry.io/otel/trace#Tracer) | Decorates the [`Selector`](./selector/selector.go#L37) with the input trace.Tracer. |
| [`WithMetrics`](./selector/selector_config.go#L88) | [`m selector.Metrics`](./selector/selector_with_metrics.go#L10) | Configures the [`Selector`](./selector/selector.go#L37) with the input metrics registry. |
| [`WithLogger`](./selector/selector_config.go#L101) | [`logger *slog.Logger`](https://pkg.go.dev/log/slog#Logger) | Configures the [`Selector`](./selector/selector.go#L37) with the input logger. |
| [`WithLogHandler`](./selector/selector_config.go#L114) | [`handler slog.Handler`](https://pkg.go.dev/log/slog#Handler) | Configures the [`Selector`](./selector/selector.go#L37) with logging using the input log handler. |
| [`WithTrace`](./selector/selector_config.go#L127) | [`tracer trace.Tracer`](https://pkg.go.dev/go.opentelemetry.io/otel/trace#Tracer) | Configures the [`Selector`](./selector/selector.go#L37) with the input trace.Tracer. |

There is a catch to the [`Selector`](./selector/selector.go#L37), which is the actual job's execution time. While the
[`Selector`](./selector/selector.go#L37) cycles through its [`executor.Executor`](./executor/executor.go#L85) list, it
Expand Down Expand Up @@ -241,12 +241,12 @@ Below is a table with all the options available for creating a cron job executor
|:------------------------------------------------------:|:---------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------:|
| [`WithRunners`](./executor/executor_config.go#L29) | [`runners ...Runner`](./executor/executor.go#L41) | Configures the [`Executor`](./executor/executor.go#L85) with the input [`Runner`(s)](./executor/executor.go#L41). |
| [`WithScheduler`](./executor/executor_config.go#L62) | [`sched schedule.Scheduler`](./schedule/scheduler.go#L28) | Configures the [`Executor`](./executor/executor.go#L85) with the input [`schedule.Scheduler`](./schedule/scheduler.go#L28). |
| [`WithSchedule`](./executor/executor_config.go#L79) | `cron string` | Configures the [`Executor`](./executor/executor.go#L85) with a [`schedule.Scheduler`](./schedule/scheduler.go#L28) using the input cron string. |
| [`WithSchedule`](./executor/executor_config.go#L79) | `cron string` | Configures the [`Executor`](./executor/executor.go#L85) with a [`schedule.Scheduler`](./schedule/scheduler.go#L28) using the input cron string. |
| [`WithLocation`](./executor/executor_config.go#L97) | `loc *time.Location` | Configures the [`Executor`](./executor/executor.go#L85) with a [`schedule.Scheduler`](./schedule/scheduler.go#L28) using the input `time.Location`. |
| [`WithMetrics`](./executor/executor_config.go#L110) | [`m executor.Metrics`](./executor/executor_with_metrics.go#L11) | Decorates the [`Executor`](./executor/executor.go#L85) with the input metrics registry. |
| [`WithLogger`](./executor/executor_config.go#L123) | [`logger *slog.Logger`](https://pkg.go.dev/log/slog#Logger) | Decorates the [`Executor`](./executor/executor.go#L85) with the input logger. |
| [`WithLogHandler`](./executor/executor_config.go#L136) | [`handler slog.Handler`](https://pkg.go.dev/log/slog#Handler) | Decorates the [`Executor`](./executor/executor.go#L85) with logging using the input log handler. |
| [`WithTrace`](./executor/executor_config.go#L149) | [`tracer trace.Tracer`](https://pkg.go.dev/go.opentelemetry.io/otel/trace#Tracer) | Decorates the [`Executor`](./executor/executor.go#L85) with the input trace.Tracer. |
| [`WithMetrics`](./executor/executor_config.go#L110) | [`m executor.Metrics`](./executor/executor_with_metrics.go#L11) | Configures the [`Executor`](./executor/executor.go#L85) with the input metrics registry. |
| [`WithLogger`](./executor/executor_config.go#L123) | [`logger *slog.Logger`](https://pkg.go.dev/log/slog#Logger) | Configures the [`Executor`](./executor/executor.go#L85) with the input logger. |
| [`WithLogHandler`](./executor/executor_config.go#L136) | [`handler slog.Handler`](https://pkg.go.dev/log/slog#Handler) | Configures the [`Executor`](./executor/executor.go#L85) with logging using the input log handler. |
| [`WithTrace`](./executor/executor_config.go#L149) | [`tracer trace.Tracer`](https://pkg.go.dev/go.opentelemetry.io/otel/trace#Tracer) | Configures the [`Executor`](./executor/executor.go#L85) with the input trace.Tracer. |


_______
Expand Down Expand Up @@ -283,14 +283,14 @@ func New(options ...cfg.Option[Config]) (Scheduler, error)
Below is a table with all the options available for creating a cron job scheduler:


| Function | Input Parameters | Description |
|:------------------------------------------------------:|:---------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------:|
| [`WithSchedule`](./schedule/scheduler_config.go#L23) | `cron string` | Configures the [`Scheduler`](./schedule/scheduler.go#L28) with the input cron string. |
| [`WithLocation`](./schedule/scheduler_config.go#L38) | `loc *time.Location` | Configures the [`Scheduler`](./schedule/scheduler.go#L28) with the input `time.Location`. |
| [`WithMetrics`](./schedule/scheduler_config.go#L51) | [`m executor.Metrics`](./schedule/scheduler_with_metrics.go#L11) | Decorates the [`Scheduler`](./schedule/scheduler.go#L28) with the input metrics registry. |
| [`WithLogger`](./schedule/scheduler_config.go#L64) | [`logger *slog.Logger`](https://pkg.go.dev/log/slog#Logger) | Decorates the [`Scheduler`](./schedule/scheduler.go#L28) with the input logger. |
| [`WithLogHandler`](./schedule/scheduler_config.go#L77) | [`handler slog.Handler`](https://pkg.go.dev/log/slog#Handler) | Decorates the [`Scheduler`](./schedule/scheduler.go#L28) with logging using the input log handler. |
| [`WithTrace`](./schedule/scheduler_config.go#L90) | [`tracer trace.Tracer`](https://pkg.go.dev/go.opentelemetry.io/otel/trace#Tracer) | Decorates the [`Scheduler`](./schedule/scheduler.go#L28) with the input trace.Tracer. |
| Function | Input Parameters | Description |
|:------------------------------------------------------:|:---------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------:|
| [`WithSchedule`](./schedule/scheduler_config.go#L23) | `cron string` | Configures the [`Scheduler`](./schedule/scheduler.go#L28) with the input cron string. |
| [`WithLocation`](./schedule/scheduler_config.go#L38) | `loc *time.Location` | Configures the [`Scheduler`](./schedule/scheduler.go#L28) with the input `time.Location`. |
| [`WithMetrics`](./schedule/scheduler_config.go#L51) | [`m executor.Metrics`](./schedule/scheduler_with_metrics.go#L11) | Configures the [`Scheduler`](./schedule/scheduler.go#L28) with the input metrics registry. |
| [`WithLogger`](./schedule/scheduler_config.go#L64) | [`logger *slog.Logger`](https://pkg.go.dev/log/slog#Logger) | Configures the [`Scheduler`](./schedule/scheduler.go#L28) with the input logger. |
| [`WithLogHandler`](./schedule/scheduler_config.go#L77) | [`handler slog.Handler`](https://pkg.go.dev/log/slog#Handler) | Configures the [`Scheduler`](./schedule/scheduler.go#L28) with logging using the input log handler. |
| [`WithTrace`](./schedule/scheduler_config.go#L90) | [`tracer trace.Tracer`](https://pkg.go.dev/go.opentelemetry.io/otel/trace#Tracer) | Configures the [`Scheduler`](./schedule/scheduler.go#L28) with the input trace.Tracer. |



Expand Down

0 comments on commit 8c66848

Please sign in to comment.