Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface { cron.Logger // Debug logs a debug message with optional key-value pairs. Debug(msg string, keysAndValues ...interface{}) }
Logger is an interface that extends the cron.Logger interface. It provides an additional method for logging debug messages.
This interface allows implementing custom logging behaviors while maintaining compatibility with the cron package's logging requirements. Implementations of this interface should provide the capability to log standard messages, as defined in the cron.Logger interface, as well as a method to log debug messages with optional key-value pairs for structured logging.
type Option ¶
type Option func(w *Watch)
Option configures a Watch instance with customizable settings.
func WithInitialize ¶
func WithInitialize(initialize initializer.WatcherInitializer) Option
WithInitialize returns an Option function that sets the provided WatcherInitializer function to initialize the Watch during its creation.
func WithLogger ¶
WithLogger returns an Option function that sets the provided Logger to the Watch for logging purposes.
type Options ¶
type Options struct { // LockName specifies the name of the lock used by the server. LockName string `json:"lock-name" mapstructure:"lock-name"` // healthzPort is the port number for the health check endpoint. HealthzPort int `json:"healthz-port" mapstructure:"healthz-port"` // DisableWatchers is a slice of watchers that will be disabled when the server is run. DisableWatchers []string `json:"disable-watchers" mapstructure:"disable-watchers"` // MaxWorkers defines the maximum number of concurrent workers that each watcher can spawn. MaxWorkers int64 `json:"max-workers" mapstructure:"max-workers"` }
Options structure holds the configuration options required to create and run a watch server.
func NewOptions ¶
func NewOptions() *Options
NewOptions initializes and returns a new Options instance with default values.
type Watch ¶
type Watch struct {
// contains filtered or unexported fields
}
Watch represents a monitoring system that schedules and runs tasks at specified intervals.