Documentation ¶
Index ¶
- Variables
- func ExpireSecret(a datastore.EndpointRepository) func(ctx context.Context, t *asynq.Task) error
- func ExportCollection(ctx context.Context, collection string, uri string, exportDir string, ...) error
- func GetArgsByCollection(collection string, uri string, exportDir string, expDate time.Time, ...) ([]string, string, error)
- func GetRetryDelay(n int, err error, t *asynq.Task) time.Duration
- func MonitorTwitterSources(store datastore.Store, queue queue.Queuer) func(context.Context, *asynq.Task) error
- func NewObjectStoreClient(config *datastore.Configuration) (objectstore.ObjectStore, string, error)
- func ProcessDeadLetters(job *queue.Job)
- func ProcessEmails(sc smtp.SmtpClient) func(context.Context, *asynq.Task) error
- func ProcessEventCreation(endpointRepo datastore.EndpointRepository, eventRepo datastore.EventRepository, ...) func(context.Context, *asynq.Task) error
- func ProcessEventDelivery(endpointRepo datastore.EndpointRepository, ...) func(context.Context, *asynq.Task) error
- func ProcessNotifications(sc smtp.SmtpClient) func(context.Context, *asynq.Task) error
- func RententionPolicies(instanceConfig config.Configuration, ...) func(context.Context, *asynq.Task) error
- func RetryEventDeliveries(statuses []datastore.EventDeliveryStatus, lookBackDuration string, ...)
- func SearchIndex(search searcher.Searcher) func(ctx context.Context, t *asynq.Task) error
- type CreateEvent
- type EndpointError
- type EventDeliveryConfig
- type Payload
- type RateLimitConfig
- type RateLimitError
- type RetryConfig
- type SignatureValues
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrProjectIdFieldIsRequired = errors.New("project_id field should be a string") ErrProjectIdFieldIsNotString = errors.New("project_id field does not exist on the document") )
View Source
var ( ErrDeliveryAttemptFailed = errors.New("error sending event") ErrRateLimit = errors.New("rate limit error") )
View Source
var ErrInvalidEmailPayload = errors.New("invalid email payload")
View Source
var ErrInvalidNotificationPayload = errors.New("invalid notification payload")
View Source
var ErrInvalidNotificationType = errors.New("invalid notification type")
View Source
var ErrInvalidSlackPayload = errors.New("invalid slack payload")
Functions ¶
func ExpireSecret ¶ added in v0.7.2
func ExportCollection ¶ added in v0.6.0
func ExportCollection(ctx context.Context, collection string, uri string, exportDir string, expDate time.Time, objectStoreClient objectstore.ObjectStore, project *datastore.Project, eventRepo datastore.EventRepository, eventDeliveriesRepo datastore.EventDeliveryRepository, projectRepo datastore.ProjectRepository, searcher searcher.Searcher) error
func GetArgsByCollection ¶ added in v0.6.0
func GetRetryDelay ¶ added in v0.6.0
func MonitorTwitterSources ¶ added in v0.6.0
func NewObjectStoreClient ¶ added in v0.6.0
func NewObjectStoreClient(config *datastore.Configuration) (objectstore.ObjectStore, string, error)
func ProcessDeadLetters ¶
func ProcessEmails ¶ added in v0.6.5
func ProcessEventCreation ¶ added in v0.6.5
func ProcessEventCreation(endpointRepo datastore.EndpointRepository, eventRepo datastore.EventRepository, projectRepo datastore.ProjectRepository, eventDeliveryRepo datastore.EventDeliveryRepository, cache cache.Cache, eventQueue queue.Queuer, subRepo datastore.SubscriptionRepository, search searcher.Searcher, deviceRepo datastore.DeviceRepository) func(context.Context, *asynq.Task) error
func ProcessEventDelivery ¶
func ProcessEventDelivery(endpointRepo datastore.EndpointRepository, eventDeliveryRepo datastore.EventDeliveryRepository, projectRepo datastore.ProjectRepository, rateLimiter limiter.RateLimiter, subRepo datastore.SubscriptionRepository, notificationQueue queue.Queuer) func(context.Context, *asynq.Task) error
func ProcessNotifications ¶ added in v0.6.5
func RententionPolicies ¶ added in v0.6.0
func RententionPolicies(instanceConfig config.Configuration, configRepo datastore.ConfigurationRepository, projectRepo datastore.ProjectRepository, eventRepo datastore.EventRepository, eventDeliveriesRepo datastore.EventDeliveryRepository, searcher searcher.Searcher) func(context.Context, *asynq.Task) error
func RetryEventDeliveries ¶ added in v0.6.0
Types ¶
type CreateEvent ¶ added in v0.8.0
type EndpointError ¶
type EndpointError struct { Err error // contains filtered or unexported fields }
func (*EndpointError) Delay ¶
func (e *EndpointError) Delay() time.Duration
func (*EndpointError) Error ¶
func (e *EndpointError) Error() string
type EventDeliveryConfig ¶ added in v0.7.0
type EventDeliveryConfig struct {
// contains filtered or unexported fields
}
type RateLimitConfig ¶ added in v0.7.0
type RateLimitError ¶ added in v0.6.0
type RateLimitError struct { Err error // contains filtered or unexported fields }
func (*RateLimitError) Delay ¶ added in v0.6.0
func (e *RateLimitError) Delay() time.Duration
func (*RateLimitError) Error ¶ added in v0.6.0
func (e *RateLimitError) Error() string
func (*RateLimitError) RateLimit ¶ added in v0.6.0
func (e *RateLimitError) RateLimit()
type RetryConfig ¶ added in v0.7.0
type RetryConfig struct { Type datastore.StrategyProvider Duration uint64 RetryCount uint64 }
type SignatureValues ¶ added in v0.5.3
Click to show internal directories.
Click to hide internal directories.