tasks

package
v1.33.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TaskPlus1 = parallel.New("test-worker", func(db *datastore.Datastore, model *Model) {
	model.Count = model.Count + 1
	model.MustPut()
})

Define a new worker with parallel.Task

View Source
var TaskSetVal = parallel.New("test-worker2", func(db *datastore.Datastore, model *Model2, v int) {
	model.Count = v
	model.MustPut()
})

Define a new worker with parallel.Task

Functions

This section is empty.

Types

type Model

type Model struct {
	mixin.Model
	Count int
}

Model 1

func NewModel

func NewModel(db *datastore.Datastore) *Model

func (Model) Document

func (m Model) Document() mixin.Document

func (*Model) Init

func (m *Model) Init(db *datastore.Datastore)

func (Model) Kind

func (m Model) Kind() string

func (*Model) Validator

func (m *Model) Validator() *val.Validator

type Model2

type Model2 struct {
	mixin.Model
	Count int
}

Model 2

func NewModel2

func NewModel2(db *datastore.Datastore) *Model2

func (Model2) Document

func (m Model2) Document() mixin.Document

func (*Model2) Init

func (m *Model2) Init(db *datastore.Datastore)

func (Model2) Kind

func (m Model2) Kind() string

func (*Model2) Validator

func (m *Model2) Validator() *val.Validator

Jump to

Keyboard shortcuts

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