group

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ModuleName = "group.star"
View Source
const Name = "group"

Variables

View Source
var Module = &starlarkstruct.Module{
	Name: Name,
	Members: starlark.StringDict{
		"make": starlark.NewBuiltin("make", Make),
	},
}

Functions

func Make

func Make(thread *starlark.Thread, _ *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)

Make 创建分组并发实例: "n", "every", "burst".

Types

type Group

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

Group 实现errgroup.Group扩展rate limit机制

func NewGroup

func NewGroup(ctx context.Context, n int, r rate.Limit, b int) *Group

NewGroup 创建groutines组

func (*Group) Attr

func (g *Group) Attr(name string) (starlark.Value, error)

func (*Group) AttrNames

func (g *Group) AttrNames() []string

func (*Group) Freeze

func (g *Group) Freeze()

func (*Group) Hash

func (g *Group) Hash() (uint32, error)

func (*Group) String

func (g *Group) String() string

func (*Group) Truth

func (g *Group) Truth() starlark.Bool

func (*Group) Type

func (g *Group) Type() string

Jump to

Keyboard shortcuts

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