Documentation ¶
Index ¶
Constants ¶
View Source
const ( // RetryAttempts sets the amount of default retries. RetryAttempts = 3 // LockDuration sets how long an item needs to be locked for. LockDuration time.Duration = time.Minute * 10 )
Variables ¶
This section is empty.
Functions ¶
func ResultToQueueMessage ¶
func ResultToQueueMessage(layer wrapper.DocumentResultLayer) (*message.QueueMessage, error)
ResultToQueueMessage converts a MongoDB result to a QueueMessage.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements the Provider interface.
func New ¶
func New(ctx context.Context, user string, pass string, host string, db string, collection string, opts *mongo.ClientOptions) (*Provider, error)
New creates a new MongoDB (UpdateChecker) with a default client.
func NewWithClient ¶
func NewWithClient(ctx context.Context, db string, collection string, client wrapper.Client) (*Provider, error)
NewWithClient creates a new MongoDB (UpdateChecker) with a provided ClientInterface client.
func (Provider) DeleteMessage ¶
DeleteMessage deletes a Document from MongoDB.
func (Provider) GetNextMessage ¶
GetNextMessage gets the next message from MongoDB.
Click to show internal directories.
Click to hide internal directories.