Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DBEntry ¶
type DBEntry struct { ID primitive.ObjectID `bson:"_id"` Queue string `bson:"queue"` Points []DataPoint `bson:"points"` }
DBEntry is one entry in the
func (*DBEntry) NewEntry ¶
func (e *DBEntry) NewEntry(status TaskStatus, ifErrorMsg error)
NewEntry ads an entry to the (*DBEntry).Points
type DataPoint ¶
type DataPoint struct { From int64 `bson:"from" json:"from"` Successes int `bson:"successes" json:"successes"` Retries int `bson:"retries" json:"retries"` Errors []string `bson:"errors" json:"errors"` // Maybe for later }
DataPoint tells if an entry is successfull or not
type MongoDBConnectOptions ¶
type MongoDBConnectOptions struct { ConnectionURI string `json:"connectionURL"` Database string `json:"database"` }
MongoDBConnectOptions contains the settings for connecting a mongodb server
type Options ¶
type Options struct {
Mongodb MongoDBConnectOptions `json:"mongodb"`
}
Options are the options for the Init function And contains all settings for the frontend Currently we only support mongodb as database
type TaskStatus ¶
type TaskStatus uint8
TaskStatus contains the status of a job
const ( StatusOke TaskStatus = iota + 1 StatusRetry StatusError )
func (TaskStatus) IsError ¶
func (s TaskStatus) IsError() bool
IsError tells if the task status is error
func (TaskStatus) IsRetry ¶
func (s TaskStatus) IsRetry() bool
IsRetry tells if the task status is retry
Click to show internal directories.
Click to hide internal directories.