backend_mongodb

package
v0.0.0-...-d3f65ed Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBackendMongoDB

func NewBackendMongoDB(client *mongo.Client, resultExpire int64, options ...options.Option) backend.Backend

func SetDatabaseName

func SetDatabaseName(databaseName string) options.Option

func SetTableGroupName

func SetTableGroupName(tableGroupName string) options.Option

func SetTableTaskName

func SetTableTaskName(tableTaskName string) options.Option

Types

type BackendMongoDB

type BackendMongoDB struct {
	// contains filtered or unexported fields
}

func (*BackendMongoDB) GetStatus

func (b *BackendMongoDB) GetStatus(taskID string) (*task.Status, error)

func (*BackendMongoDB) GroupCompleted

func (b *BackendMongoDB) GroupCompleted(groupID string) (bool, error)

func (*BackendMongoDB) GroupTakeOver

func (b *BackendMongoDB) GroupTakeOver(groupID string, name string, taskIDs ...string) error

func (*BackendMongoDB) GroupTaskStatus

func (b *BackendMongoDB) GroupTaskStatus(groupID string) ([]*task.Status, error)

func (*BackendMongoDB) ResetGroup

func (b *BackendMongoDB) ResetGroup(groupIDs ...string) error

func (*BackendMongoDB) ResetTask

func (b *BackendMongoDB) ResetTask(taskIDs ...string) error

func (*BackendMongoDB) SetResultExpire

func (b *BackendMongoDB) SetResultExpire(expire int64)

SetResultExpire 设置结果超时时间

func (*BackendMongoDB) SetStateFailure

func (b *BackendMongoDB) SetStateFailure(signature *task.Signature, err string) error

func (*BackendMongoDB) SetStatePending

func (b *BackendMongoDB) SetStatePending(signature *task.Signature) error

func (*BackendMongoDB) SetStateReceived

func (b *BackendMongoDB) SetStateReceived(signature *task.Signature) error

func (*BackendMongoDB) SetStateRetry

func (b *BackendMongoDB) SetStateRetry(signature *task.Signature) error

func (*BackendMongoDB) SetStateStarted

func (b *BackendMongoDB) SetStateStarted(signature *task.Signature) error

func (*BackendMongoDB) SetStateSuccess

func (b *BackendMongoDB) SetStateSuccess(signature *task.Signature, results []*task.Result) error

func (*BackendMongoDB) TriggerCompleted

func (b *BackendMongoDB) TriggerCompleted(groupID string) (bool, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL