Documentation
¶
Index ¶
- type IdempotencyStore
- func (s *IdempotencyStore) Begin(key, reqHash, method, path string) (fh.IdempotencyDecision, *fh.IdempotencyRecord, error)
- func (s *IdempotencyStore) Close() error
- func (s *IdempotencyStore) Complete(key, reqHash string, status int, contentType string, ...) error
- func (s *IdempotencyStore) PurgeExpired(ctx context.Context, now time.Time) (int, error)
- type JournalStore
- type QueueStorage
- func (s *QueueStorage) Claim(ctx context.Context, now time.Time) (*fh.QueueJob, error)
- func (s *QueueStorage) Close() error
- func (s *QueueStorage) Complete(ctx context.Context, job *fh.QueueJob) error
- func (s *QueueStorage) DiscardFailed(ctx context.Context, id string) error
- func (s *QueueStorage) Enqueue(ctx context.Context, job *fh.QueueJob) error
- func (s *QueueStorage) Fail(ctx context.Context, job *fh.QueueJob, cause error) error
- func (s *QueueStorage) ListJobs(ctx context.Context, state string, limit int) ([]fh.QueueJobSnapshot, error)
- func (s *QueueStorage) PurgeJobs(ctx context.Context, state string, before time.Time, limit int) (int, error)
- func (s *QueueStorage) Recover(ctx context.Context) error
- func (s *QueueStorage) RequeueFailed(ctx context.Context, id string) error
- func (s *QueueStorage) Retry(ctx context.Context, job *fh.QueueJob, cause error, backoff time.Duration) error
- func (s *QueueStorage) Stats(ctx context.Context) (fh.QueueStats, error)
- type Store
- type StoreConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IdempotencyStore ¶
type IdempotencyStore struct {
// contains filtered or unexported fields
}
func NewIdempotencyStore ¶
func NewIdempotencyStore(ttl time.Duration) *IdempotencyStore
func NewIdempotencyStoreWithLimit ¶
func NewIdempotencyStoreWithLimit(ttl time.Duration, maxEntries int) *IdempotencyStore
func (*IdempotencyStore) Begin ¶
func (s *IdempotencyStore) Begin(key, reqHash, method, path string) (fh.IdempotencyDecision, *fh.IdempotencyRecord, error)
func (*IdempotencyStore) Close ¶
func (s *IdempotencyStore) Close() error
func (*IdempotencyStore) PurgeExpired ¶
type JournalStore ¶
type JournalStore struct {
// contains filtered or unexported fields
}
func (*JournalStore) Append ¶
func (s *JournalStore) Append(e fh.RequestJournalEntry) error
func (*JournalStore) Close ¶
func (s *JournalStore) Close() error
func (*JournalStore) Entries ¶
func (s *JournalStore) Entries() []fh.RequestJournalEntry
type QueueStorage ¶
type QueueStorage struct {
// contains filtered or unexported fields
}
func NewQueueStorage ¶
func NewQueueStorage() *QueueStorage
func NewQueueStorageWithLimit ¶
func NewQueueStorageWithLimit(maxEntries int) *QueueStorage
func (*QueueStorage) Close ¶
func (s *QueueStorage) Close() error
func (*QueueStorage) DiscardFailed ¶
func (s *QueueStorage) DiscardFailed(ctx context.Context, id string) error
func (*QueueStorage) ListJobs ¶
func (s *QueueStorage) ListJobs(ctx context.Context, state string, limit int) ([]fh.QueueJobSnapshot, error)
func (*QueueStorage) RequeueFailed ¶
func (s *QueueStorage) RequeueFailed(ctx context.Context, id string) error
func (*QueueStorage) Stats ¶
func (s *QueueStorage) Stats(ctx context.Context) (fh.QueueStats, error)
type Store ¶
type Store struct {
Journal *JournalStore
Idempotency *IdempotencyStore
Queue *QueueStorage
}
Store groups process-local reliability adapters. Use New().Journal, New().Idempotency and New().Queue in fh.ReliabilityConfig. These adapters are non-distributed and intentionally simple for tests, benchmarks and embedded use.
func NewWithConfig ¶
func NewWithConfig(cfg StoreConfig) *Store
type StoreConfig ¶
Click to show internal directories.
Click to hide internal directories.