Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Database ¶
type Database interface { UpdateJobExecutions(ctx context.Context) (int, error) RemoveFromUriQueue(ctx context.Context) (int, error) MoveWaitToReady() (int, error) MoveBusyToTimeout() (int, error) MoveRunningToTimeout() (int, error) TimeoutCrawlExecutions(ctx context.Context) (int, error) }
Database is an abstraction layer between the business layer and database implementation details
func NewDatabase ¶
type RethinkDbConnection ¶
type RethinkDbConnection struct {
// contains filtered or unexported fields
}
RethinkDbConnection holds the database connection
func NewRethinkDbConnection ¶
func NewRethinkDbConnection(opts RethinkDbOptions) *RethinkDbConnection
NewRethinkDbConnection creates a new RethinkDbConnection object
func (*RethinkDbConnection) Close ¶
func (c *RethinkDbConnection) Close() error
Close closes the RethinkDbConnection
func (*RethinkDbConnection) Connect ¶
func (c *RethinkDbConnection) Connect() error
Connect establishes connections
type RethinkDbMockConnection ¶
type RethinkDbMockConnection struct {
*RethinkDbConnection
}
func NewMockConnection ¶
func NewMockConnection() *RethinkDbMockConnection
NewMockConnection creates a new mocked RethinkDbConnection object
func (*RethinkDbMockConnection) Close ¶
func (c *RethinkDbMockConnection) Close() error
func (*RethinkDbMockConnection) GetMock ¶
func (c *RethinkDbMockConnection) GetMock() *r.Mock
Click to show internal directories.
Click to hide internal directories.