redis

package module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2021 License: BSD-3-Clause Imports: 11 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisStore

type RedisStore struct {
	// contains filtered or unexported fields
}

func New

func New(prefix, host string, port int) *RedisStore

func NewFromConfig

func NewFromConfig(config *RedisStoreConfig) *RedisStore

func (*RedisStore) Close

func (s *RedisStore) Close() error

func (*RedisStore) CreateStrategy

func (s *RedisStore) CreateStrategy(strategy *definition.Strategy) error

func (*RedisStore) CreateTask

func (s *RedisStore) CreateTask(task *definition.Task) error

func (*RedisStore) Dump

func (s *RedisStore) Dump() string

func (*RedisStore) GetScheduler

func (s *RedisStore) GetScheduler(id string) (*definition.Scheduler, error)

func (*RedisStore) GetSchedulers

func (s *RedisStore) GetSchedulers() ([]*definition.Scheduler, error)

func (*RedisStore) GetStrategies

func (s *RedisStore) GetStrategies() ([]*definition.Strategy, error)

func (*RedisStore) GetStrategy

func (s *RedisStore) GetStrategy(id string) (*definition.Strategy, error)

func (*RedisStore) GetStrategyRuntime

func (s *RedisStore) GetStrategyRuntime(strategyId, schedulerId string) (*definition.StrategyRuntime, error)

func (*RedisStore) GetStrategyRuntimes

func (s *RedisStore) GetStrategyRuntimes(strategyId string) ([]*definition.StrategyRuntime, error)

func (*RedisStore) GetTask

func (s *RedisStore) GetTask(id string) (*definition.Task, error)

func (*RedisStore) GetTaskAssignment

func (s *RedisStore) GetTaskAssignment(strategyId, taskId, itemId string) (*definition.TaskAssignment, error)

func (*RedisStore) GetTaskAssignments

func (s *RedisStore) GetTaskAssignments(strategyId, taskId string) ([]*definition.TaskAssignment, error)

func (*RedisStore) GetTaskItemsConfigVersion

func (s *RedisStore) GetTaskItemsConfigVersion(strategyId, taskId string) (int64, error)

func (*RedisStore) GetTaskRuntime

func (s *RedisStore) GetTaskRuntime(strategyId, taskId, id string) (*definition.TaskRuntime, error)

func (*RedisStore) GetTaskRuntimes

func (s *RedisStore) GetTaskRuntimes(strategyId, taskId string) ([]*definition.TaskRuntime, error)

func (*RedisStore) GetTasks

func (s *RedisStore) GetTasks() ([]*definition.Task, error)

func (*RedisStore) IncreaseTaskItemsConfigVersion

func (s *RedisStore) IncreaseTaskItemsConfigVersion(strategyId, taskId string) error

func (*RedisStore) Name

func (s *RedisStore) Name() string

func (*RedisStore) RegisterScheduler

func (s *RedisStore) RegisterScheduler(scheduler *definition.Scheduler) error

func (*RedisStore) RemoveStrategy

func (s *RedisStore) RemoveStrategy(id string) error

func (*RedisStore) RemoveStrategyRuntime

func (s *RedisStore) RemoveStrategyRuntime(strategyId, schedulerId string) error

func (*RedisStore) RemoveTask

func (s *RedisStore) RemoveTask(id string) error

func (*RedisStore) RemoveTaskAssignment

func (s *RedisStore) RemoveTaskAssignment(strategyId, taskId, itemId string) error

func (*RedisStore) RemoveTaskRuntime

func (s *RedisStore) RemoveTaskRuntime(strategyId, taskId, id string) error

func (*RedisStore) Sequence

func (s *RedisStore) Sequence() (uint64, error)

func (*RedisStore) SetStrategyRuntime

func (s *RedisStore) SetStrategyRuntime(runtime *definition.StrategyRuntime) error

func (*RedisStore) SetTaskAssignment

func (s *RedisStore) SetTaskAssignment(assignment *definition.TaskAssignment) error

func (*RedisStore) SetTaskRuntime

func (s *RedisStore) SetTaskRuntime(runtime *definition.TaskRuntime) error

func (*RedisStore) Time

func (s *RedisStore) Time() int64

func (*RedisStore) UnregisterScheduler

func (s *RedisStore) UnregisterScheduler(id string) error

func (*RedisStore) UpdateStrategy

func (s *RedisStore) UpdateStrategy(strategy *definition.Strategy) error

func (*RedisStore) UpdateTask

func (s *RedisStore) UpdateTask(task *definition.Task) error

type RedisStoreConfig

type RedisStoreConfig struct {
	// nodes/cluster nodes addresses
	Addrs []string
	// prefix which can isolate different applciations in same redis instance/cluster
	Prefix string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL