map_chan

package
v0.0.0-...-fc8e49a Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultChanNum         = 16
	DefaultChanSize        = 1000
	DefaultSendChanTimeout = 1 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChanElement

type ChanElement[T any] struct {
	// contains filtered or unexported fields
}

type MapChan

type MapChan[T any] struct {
	// contains filtered or unexported fields
}

func NewMapChan

func NewMapChan[T any](name string, chanNum, chanSize int, sendChanTimeout time.Duration, fn func(ctx context.Context, t T), cleanFn func(context.Context)) *MapChan[T]

func (*MapChan[T]) ChangeChanList

func (c *MapChan[T]) ChangeChanList(chanNum, chanSize int)

func (*MapChan[T]) Close

func (c *MapChan[T]) Close()

func (*MapChan[T]) Send

func (c *MapChan[T]) Send(v T, key string) error

Jump to

Keyboard shortcuts

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