Documentation
¶
Index ¶
- type Data
- type DataKeeper
- func (dk *DataKeeper) GetData(ctx context.Context) ([]*models.Data, error)
- func (dk *DataKeeper) Init(ctx context.Context) error
- func (dk *DataKeeper) RemoveOldData(ctx context.Context) error
- func (dk *DataKeeper) SaveData(ctx context.Context, data *models.Data) error
- func (dk *DataKeeper) SetFailedData(ctx context.Context) error
- func (dk *DataKeeper) UpdateFailedData(ctx context.Context, codes []string) error
- func (dk *DataKeeper) UpdateLockedData(ctx context.Context) error
- func (dk *DataKeeper) UpdateProcessedData(ctx context.Context, codes []string) error
- type DataKeeperOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataKeeper ¶
type DataKeeper struct {
// contains filtered or unexported fields
}
func NewDataKeeper ¶
func NewDataKeeper( db connectors.DBConnector[*sqlx.DB, *sqlx.Tx], opts ...DataKeeperOption, ) *DataKeeper
func (*DataKeeper) RemoveOldData ¶
func (dk *DataKeeper) RemoveOldData(ctx context.Context) error
func (*DataKeeper) SetFailedData ¶
func (dk *DataKeeper) SetFailedData(ctx context.Context) error
func (*DataKeeper) UpdateFailedData ¶
func (dk *DataKeeper) UpdateFailedData(ctx context.Context, codes []string) error
func (*DataKeeper) UpdateLockedData ¶
func (dk *DataKeeper) UpdateLockedData(ctx context.Context) error
func (*DataKeeper) UpdateProcessedData ¶
func (dk *DataKeeper) UpdateProcessedData(ctx context.Context, codes []string) error
type DataKeeperOption ¶
type DataKeeperOption func(dk *DataKeeper)
func WithLockedTimeDataKeeperOpt ¶
func WithLockedTimeDataKeeperOpt(lockedTime time.Duration) DataKeeperOption
func WithMaxAttemptsDataKeeperOpt ¶
func WithMaxAttemptsDataKeeperOpt(maxAttempts int) DataKeeperOption
func WithRemoveOldDataDataKeeperOpt ¶
func WithRemoveOldDataDataKeeperOpt(removeOld time.Duration) DataKeeperOption
Click to show internal directories.
Click to hide internal directories.