zombie

package module
v0.0.0-...-481eb90 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2022 License: MIT Imports: 5 Imported by: 9

README

zombie

AFAIRE

Go Report Card Go Reference

Licence

MIT.


Copyright (c) 2021-2022 losyme

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GWContext

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

func GoWithContext

func GoWithContext(ctx context.Context, count int, fn func(ctx context.Context, n int), opts ...Option) *GWContext

func NewGWContext

func NewGWContext(ctx context.Context, opts ...Option) *GWContext

func (*GWContext) Go

func (g *GWContext) Go(count int, fn func(ctx context.Context, n int), name string)

func (*GWContext) Stop

func (g *GWContext) Stop()

func (*GWContext) Wait

func (g *GWContext) Wait()

type GWTicker

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

func GoWithTicker

func GoWithTicker(ctx context.Context, count int, d time.Duration, cb func(), opts ...Option) *GWTicker

func (*GWTicker) Go

func (g *GWTicker) Go(count int)

func (*GWTicker) Stop

func (g *GWTicker) Stop()

func (*GWTicker) Wait

func (g *GWTicker) Wait()

type GWTimer

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

func GoWithTimer

func GoWithTimer(ctx context.Context, count int, d time.Duration, cb func() time.Duration, opts ...Option) *GWTimer

func (*GWTimer) Go

func (g *GWTimer) Go(count int)

func (*GWTimer) Stop

func (g *GWTimer) Stop()

func (*GWTimer) Wait

func (g *GWTimer) Wait()

type Group

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

func Go

func Go(count int, fn func(n int), opts ...Option) *Group

func NewGroup

func NewGroup(opts ...Option) *Group

func (*Group) Go

func (g *Group) Go(count int, fn func(n int), name string)

func (*Group) Wait

func (g *Group) Wait()

type Logger

type Logger interface {
	Trace(msg string, kv ...interface{})
}

type Option

type Option func(*Group)

func WithLogger

func WithLogger(logger Logger) Option

func WithName

func WithName(name string) Option

Jump to

Keyboard shortcuts

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