Documentation
¶
Index ¶
- type RedisConfig
- type RedisProvider
- func (rp *RedisProvider) CancelMultiple(ctx context.Context, taskIDs []string) error
- func (rp *RedisProvider) CancelTask(ctx context.Context, taskID string) error
- func (rp *RedisProvider) Connect(ctx context.Context) error
- func (rp *RedisProvider) Disconnect(ctx context.Context) error
- func (rp *RedisProvider) GetConnectionInfo() *types.ConnectionInfo
- func (rp *RedisProvider) GetHealth(ctx context.Context) (*types.HealthStatus, error)
- func (rp *RedisProvider) GetMetrics(ctx context.Context) (*types.Metrics, error)
- func (rp *RedisProvider) GetName() string
- func (rp *RedisProvider) GetSupportedFeatures() []types.SchedulingFeature
- func (rp *RedisProvider) GetTask(ctx context.Context, taskID string) (*types.Task, error)
- func (rp *RedisProvider) IsConnected() bool
- func (rp *RedisProvider) ListTasks(ctx context.Context, filter *types.TaskFilter) ([]*types.Task, error)
- func (rp *RedisProvider) Ping(ctx context.Context) error
- func (rp *RedisProvider) ScheduleMultiple(ctx context.Context, tasks []*types.Task) ([]*types.TaskResult, error)
- func (rp *RedisProvider) ScheduleTask(ctx context.Context, task *types.Task) (*types.TaskResult, error)
- func (rp *RedisProvider) UpdateTask(ctx context.Context, task *types.Task) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisConfig ¶
type RedisConfig struct {
Host string `json:"host"`
Port int `json:"port"`
Password string `json:"password"`
Database int `json:"database"`
PoolSize int `json:"pool_size"`
MinIdleConns int `json:"min_idle_conns"`
MaxRetries int `json:"max_retries"`
DialTimeout time.Duration `json:"dial_timeout"`
ReadTimeout time.Duration `json:"read_timeout"`
WriteTimeout time.Duration `json:"write_timeout"`
Metadata map[string]string `json:"metadata"`
}
RedisConfig holds Redis-specific configuration
type RedisProvider ¶
type RedisProvider struct {
// contains filtered or unexported fields
}
RedisProvider implements SchedulingProvider using Redis
func NewRedisProvider ¶
func NewRedisProvider(config *RedisConfig, logger *logrus.Logger) (*RedisProvider, error)
NewRedisProvider creates a new Redis scheduling provider
func (*RedisProvider) CancelMultiple ¶
func (rp *RedisProvider) CancelMultiple(ctx context.Context, taskIDs []string) error
CancelMultiple cancels multiple tasks
func (*RedisProvider) CancelTask ¶
func (rp *RedisProvider) CancelTask(ctx context.Context, taskID string) error
CancelTask cancels a scheduled task
func (*RedisProvider) Connect ¶
func (rp *RedisProvider) Connect(ctx context.Context) error
Connect connects the provider
func (*RedisProvider) Disconnect ¶
func (rp *RedisProvider) Disconnect(ctx context.Context) error
Disconnect disconnects the provider
func (*RedisProvider) GetConnectionInfo ¶
func (rp *RedisProvider) GetConnectionInfo() *types.ConnectionInfo
GetConnectionInfo returns connection information
func (*RedisProvider) GetHealth ¶
func (rp *RedisProvider) GetHealth(ctx context.Context) (*types.HealthStatus, error)
GetHealth returns the health status
func (*RedisProvider) GetMetrics ¶
GetMetrics returns provider metrics
func (*RedisProvider) GetName ¶
func (rp *RedisProvider) GetName() string
GetName returns the provider name
func (*RedisProvider) GetSupportedFeatures ¶
func (rp *RedisProvider) GetSupportedFeatures() []types.SchedulingFeature
GetSupportedFeatures returns supported features
func (*RedisProvider) IsConnected ¶
func (rp *RedisProvider) IsConnected() bool
IsConnected returns connection status
func (*RedisProvider) ListTasks ¶
func (rp *RedisProvider) ListTasks(ctx context.Context, filter *types.TaskFilter) ([]*types.Task, error)
ListTasks lists tasks with optional filtering
func (*RedisProvider) Ping ¶
func (rp *RedisProvider) Ping(ctx context.Context) error
Ping checks if the provider is responsive
func (*RedisProvider) ScheduleMultiple ¶
func (rp *RedisProvider) ScheduleMultiple(ctx context.Context, tasks []*types.Task) ([]*types.TaskResult, error)
ScheduleMultiple schedules multiple tasks
func (*RedisProvider) ScheduleTask ¶
func (rp *RedisProvider) ScheduleTask(ctx context.Context, task *types.Task) (*types.TaskResult, error)
ScheduleTask schedules a task
func (*RedisProvider) UpdateTask ¶
UpdateTask updates an existing task