parallel

package
v0.0.0-...-dd22d64 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: AGPL-3.0 Imports: 3 Imported by: 1

Documentation

Overview

Package parallel allows multiple checks in paralell using xlist.Check interface.

This package is a work in progress and makes no API stability promises.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	Name     string
	Resource xlist.Resource
}

Request encapsules xlist queries in a struct for parallel checks.

type Response

type Response struct {
	Request  Request
	Response xlist.Response
	Err      error
}

Response is used for store request and response in an Check parallel to the list checker.

func Check

func Check(ctx context.Context, checkers []xlist.Checker, requests []Request) ([]Response, bool, error)

Check checks a set of queries in parallel. It returns an slice with the response, a boolean returning true if there is an error in at least one query and an error if there was a problem in the parallel check.

Jump to

Keyboard shortcuts

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