repeatingtask

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Copyright 2018 Iguazio Systems Ltd.

Licensed under the Apache License, Version 2.0 (the "License") with an addition restriction as set forth herein. You may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

In addition, you may not use the software for any purposes that are illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction.

Copyright 2018 Iguazio Systems Ltd.

Licensed under the Apache License, Version 2.0 (the "License") with an addition restriction as set forth herein. You may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

In addition, you may not use the software for any purposes that are illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction.

Copyright 2018 Iguazio Systems Ltd.

Licensed under the Apache License, Version 2.0 (the "License") with an addition restriction as set forth herein. You may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

In addition, you may not use the software for any purposes that are illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction.

Copyright 2018 Iguazio Systems Ltd.

Licensed under the Apache License, Version 2.0 (the "License") with an addition restriction as set forth herein. You may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

In addition, you may not use the software for any purposes that are illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction.

Index

Constants

View Source
const (
	InfiniteFailures = -1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

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

func NewPool

func NewPool(ctx context.Context, maxTasks int, numWorkers int) (*Pool, error)

func (*Pool) SubmitTask

func (p *Pool) SubmitTask(task *Task) error

func (*Pool) SubmitTaskAndWait

func (p *Pool) SubmitTaskAndWait(task *Task) TaskErrors

type Task

type Task struct {
	NumReptitions  int
	MaxParallel    int
	Handler        func(interface{}, int) error
	OnCompleteChan chan struct{}
	Timeout        time.Duration
	ErrorsChan     chan *TaskError
	MaxNumErrors   int
	Cookie         interface{}
	// contains filtered or unexported fields
}

func (*Task) Wait

func (t *Task) Wait() TaskErrors

type TaskError

type TaskError struct {
	Repetition int
	Error      error
}

type TaskErrors

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

func (*TaskErrors) Error

func (te *TaskErrors) Error() error

func (*TaskErrors) String

func (te *TaskErrors) String() string

type TaskGroup

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

func NewTaskGroup

func NewTaskGroup() (*TaskGroup, error)

func (*TaskGroup) AddTask

func (t *TaskGroup) AddTask(task *Task) error

func (*TaskGroup) Wait

func (t *TaskGroup) Wait() TaskGroupErrors

type TaskGroupErrors

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

func (*TaskGroupErrors) Error

func (tge *TaskGroupErrors) Error() error

func (*TaskGroupErrors) Errors

func (tge *TaskGroupErrors) Errors() []error

Jump to

Keyboard shortcuts

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