Versions in this module Expand all Collapse all v1 v1.1.1 Aug 9, 2023 v1.1.0 Aug 2, 2023 Changes in this version + const GlobalKeyPrefix + const OptionTypeLogger + const OptionTypeTimeout + func GetKeyPre(serviceName string) string + func GetNodeId(serviceName string) string + func GetStableJobStore(serviceName string) string + func GetStableJobStoreTxKey(serviceName string) string + func TimePre(t time.Time, preDuration time.Duration) int64 + type DriverV2 interface + GetNodes func(ctx context.Context) (nodes []string, err error) + Init func(serviceName string, opts ...Option) + NodeID func() string + Start func(ctx context.Context) (err error) + Stop func(ctx context.Context) (err error) + func NewEtcdDriver(etcdCli *clientv3.Client) DriverV2 + func NewRedisDriver(redisClient *redis.Client) DriverV2 + func NewRedisZSetDriver(redisClient *redis.Client) DriverV2 + type EtcdDriver struct + func (e *EtcdDriver) GetNodes(ctx context.Context) (nodes []string, err error) + func (e *EtcdDriver) Init(serverName string, opts ...Option) + func (e *EtcdDriver) NodeID() string + func (e *EtcdDriver) Start(ctx context.Context) (err error) + func (e *EtcdDriver) Stop(ctx context.Context) (err error) + type LoggerOption struct + func NewLoggerOption(logger dlog.Logger) LoggerOption + func (to LoggerOption) Type() int + type Option interface + Type func() int + type RedisDriver struct + func (rd *RedisDriver) GetNodes(ctx context.Context) (nodes []string, err error) + func (rd *RedisDriver) Init(serviceName string, opts ...Option) + func (rd *RedisDriver) NodeID() string + func (rd *RedisDriver) Start(ctx context.Context) (err error) + func (rd *RedisDriver) Stop(ctx context.Context) (err error) + type RedisZSetDriver struct + func (rd *RedisZSetDriver) GetNodes(ctx context.Context) (nodes []string, err error) + func (rd *RedisZSetDriver) Init(serviceName string, opts ...Option) + func (rd *RedisZSetDriver) NodeID() string + func (rd *RedisZSetDriver) Start(ctx context.Context) (err error) + func (rd *RedisZSetDriver) Stop(ctx context.Context) (err error) + type TimeoutOption struct + func NewTimeoutOption(timeout time.Duration) TimeoutOption + func (to TimeoutOption) Type() int