Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsulClient ¶
EtcdClient implements the Storage interface
func NewConsulClient ¶
func NewConsulClient(addr string) (*ConsulClient, error)
NewConsulClient creates a new ConsulClient instance
func (*ConsulClient) LoadTimestamp ¶
func (s *ConsulClient) LoadTimestamp() (time.Time, error)
LoadTimestamp gets the timestamp
func (*ConsulClient) SaveTimestamp ¶
func (s *ConsulClient) SaveTimestamp(ts time.Time) error
SaveTimestamp saves the timestamp
type EtcdClient ¶
EtcdClient implements the Storage interface
func (*EtcdClient) LoadTimestamp ¶
func (s *EtcdClient) LoadTimestamp() (time.Time, error)
LoadTimestamp gets the timestamp
func (*EtcdClient) SaveTimestamp ¶
func (s *EtcdClient) SaveTimestamp(ts time.Time) error
SaveTimestamp saves the timestamp
type MemStorage ¶
type MemStorage struct {
// contains filtered or unexported fields
}
MemStorage is an in-memory implementation of the Storage interface
func (*MemStorage) LoadTimestamp ¶
func (m *MemStorage) LoadTimestamp() (time.Time, error)
LoadTimestamp loads the stored timestamp
func (*MemStorage) SaveTimestamp ¶
func (m *MemStorage) SaveTimestamp(ts time.Time) error
SaveTimestamp stores a timestamp
type RedisClient ¶
func NewRedisClient ¶
func NewRedisClient(addr string) (*RedisClient, error)
NewRedisClient creates a new Redis client
func (*RedisClient) Close ¶
func (r *RedisClient) Close() error
Close closes the Redis client connection
func (*RedisClient) LoadTimestamp ¶
func (r *RedisClient) LoadTimestamp() (time.Time, error)
LoadTimestamp loads a timestamp from Redis
func (*RedisClient) SaveTimestamp ¶
func (r *RedisClient) SaveTimestamp(ts time.Time) error
SaveTimestamp saves a timestamp to Redis
Click to show internal directories.
Click to hide internal directories.