xring

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ring

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

A Ring can be used as fixed size ring.

func NewRing

func NewRing(n int) *Ring

NewRing returns a Ring object with the given size n.

func (*Ring) Add

func (r *Ring) Add(v interface{})

Add adds v into r.

func (*Ring) Take

func (r *Ring) Take() []interface{}

Take takes all items from r.

Jump to

Keyboard shortcuts

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