taskgroup

package
v0.0.0-...-780ac92 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	*container.BaseCotainer

	Err error
	// contains filtered or unexported fields
}

Container represents the environment for a group of tasks.

func NewContainer

func NewContainer(ctx context.Context, conf *config.JSON) (c *Container, err error)

NewContainer creates a task group container based on the JSON configuration conf. If jobID or taskGroupID is invalid, an error will be reported.

func (*Container) Do

func (c *Container) Do() error

Do represents the execution action.

func (*Container) JobID

func (c *Container) JobID() int64

JobID refers to the unique identifier for a job.

func (*Container) Start

func (c *Container) Start() (err error)

Start initiates the execution of tasks using the task scheduler based on the JSON configurations.

func (*Container) TaskGroupID

func (c *Container) TaskGroupID() int64

TaskGroupID refers to the unique identifier for a group of tasks.

type Stats

type Stats struct {
	TaskID  int64             `json:"taskID"`
	Channel channel.StatsJSON `json:"channel"`
}

Stats - Information or metrics related to the task's execution

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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