task

package
v0.0.0-...-958ef34 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

* Copyright (c) 2023 Juice Technologies, Inc. All Rights Reserved.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group interface {
	Ctx() context.Context
	Cancel()
	Go(string, Task)
	GoFn(string, TaskFn)
}

type Task

type Task interface {
	Run(group Group) error
}

type TaskFn

type TaskFn = func(Group) error

type TaskManager

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

func NewTaskManager

func NewTaskManager(ctx context.Context) *TaskManager

func (*TaskManager) Cancel

func (group *TaskManager) Cancel()

func (*TaskManager) Ctx

func (group *TaskManager) Ctx() context.Context

func (*TaskManager) Go

func (group *TaskManager) Go(label string, task Task)

func (*TaskManager) GoFn

func (group *TaskManager) GoFn(label string, task TaskFn)

func (*TaskManager) Wait

func (group *TaskManager) Wait() error

type Waiter

type Waiter interface {
	Wait() error
}

Jump to

Keyboard shortcuts

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