Versions in this module Expand all Collapse all v0 v0.11.1 Mar 16, 2021 v0.10.1 Mar 16, 2021 Changes in this version + type LocalStateService struct + func NewLocalStateService(logger log.Logger, lockerID string, lockFileDir string) (s *LocalStateService, err error) + func (s *LocalStateService) FetchDistLock(lockKey string, locker string, expiredInMS int) (bool, error) + func (s *LocalStateService) GetDistState(stateKey string) (state string, err error) + func (s *LocalStateService) GetLockerID() string + func (s *LocalStateService) ReleaseDistLock(lockKey string, locker string) (bool, error) + func (s *LocalStateService) RemoveStateFile(stateKey string) error + func (s *LocalStateService) SetDistState(stateKey string, stateValue string) error + func (s *LocalStateService) UnlockDistLockWithState(lockKey string, locker string, stateKey string, stateValue string) (bool, error) + type RedisDistributeStateService struct + func NewRedisDistributeStateService(redisURL string, redisPass string, logger log.Logger, lockerID string) (*RedisDistributeStateService, error) + func (s *RedisDistributeStateService) FetchDistLock(lockKey string, locker string, expiredInMS int) (bool, error) + func (s *RedisDistributeStateService) GetDistState(stateKey string) (string, error) + func (s *RedisDistributeStateService) GetLockerID() string + func (s *RedisDistributeStateService) ReleaseDistLock(lockKey string, locker string) (bool, error) + func (s *RedisDistributeStateService) SetDistState(stateKey string, stateValue string) error + func (s *RedisDistributeStateService) UnlockDistLockWithState(lockKey string, locker string, stateKey string, stateValue string) (bool, error)