bucket

package
v2.0.0-...-e9536b8 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

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

Bucket is a channel holder.

func NewBucket

func NewBucket(cns int) (b *Bucket)

NewBucket new a bucket struct. store the key with im channel.

func (*Bucket) Channel

func (b *Bucket) Channel(key string) (ch *channel.Channel)

Channel get a channel by sub key.

func (*Bucket) ChannelCount

func (b *Bucket) ChannelCount() int

ChannelCount channel count in the bucket

func (*Bucket) Del

func (b *Bucket) Del(dch *channel.Channel)

Del delete the channel by sub key.

func (*Bucket) IPCount

func (b *Bucket) IPCount() (res map[string]struct{})

IPCount get ip count.

func (*Bucket) Put

func (b *Bucket) Put(ch *channel.Channel)

Put put a channel according with sub key.

Jump to

Keyboard shortcuts

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