xxpool

package
v0.2.53 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MulanPSL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

@author fenglei

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AntPoolClient

type AntPoolClient struct {
	ExpiryDuration time.Duration //超时时间
}

func NewAntPoolClient

func NewAntPoolClient() *AntPoolClient

func (*AntPoolClient) AntPool

func (e *AntPoolClient) AntPool(size int, pff func(interface{}), listT interface{}) error

AntPool 增强版,可以处理任何类型的切片 参数 listT 可以是 []interface{} 或任何其他类型的切片

func (*AntPoolClient) AntPoolWithResult added in v0.1.8

func (e *AntPoolClient) AntPoolWithResult(size int, processor func(interface{}) interface{}, listT interface{}) ([]interface{}, error)

AntPoolWithResult 增强版,可以处理任何类型的切片并收集处理结果 参数 listT 可以是 []interface{} 或任何其他类型的切片 processor 函数可以返回任意类型的值,这些值将被收集并返回

Jump to

Keyboard shortcuts

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