Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct { // Log is the logger to use for logging. Log logr.Logger // Client is the etcd client to use for storing cron entries. Client *clientv3.Client // Namespace is the etcd namespace to use for storing cron entries. Namespace string // PartitionID is the partition ID to use for storing cron entries. PartitionID uint32 // PartitionTotal is the total number of partitions to use for storing cron // entries. PartitionTotal uint32 // TriggerFn is the function to call when a cron job is triggered. TriggerFn api.TriggerFunction // CounterGarbageCollectionInterval is the interval at which to run the // garbage collection for counters is run. Counters are also garbage // collected on shutdown. Counters are batch deleted, so a larger value // increases the counter bucket and reduces the number of database // operations. // This value rarely needs to be set and is mostly used for testing. A small // interval value will increase database operations and thus degrade cron // performance. // Defaults to 180 seconds. CounterGarbageCollectionInterval *time.Duration // ReplicaData is custom data associated with the replica, for example, // host + port for the active replica. This data will be written to the leadership keyspace, with the latest cluster values being returned from `WatchLeadership`. Useful for consumer coordination. ReplicaData *anypb.Any }
Options are the options for creating a new cron instance.
Click to show internal directories.
Click to hide internal directories.