utils

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const TimeFormat = time.RFC3339

TimeFormat defines default time format in this repo.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deque

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

Deque defines deque struct.

func NewDeque

func NewDeque() *Deque

NewDeque returns a deque object.

func (*Deque) Back

func (d *Deque) Back() (interface{}, bool)

Back peeks back.

func (*Deque) Head

func (d *Deque) Head() (interface{}, bool)

Head peeks head.

func (*Deque) Len

func (d *Deque) Len() uint64

Len returns length.

func (*Deque) PopBack

func (d *Deque) PopBack() (interface{}, bool)

PopBack pops an object from back.

func (*Deque) PopFront

func (d *Deque) PopFront() (interface{}, bool)

PopFront pops an object from front.

func (*Deque) PushBack

func (d *Deque) PushBack(obj interface{})

PushBack pushes an object to back.

func (*Deque) PushFront

func (d *Deque) PushFront(obj interface{})

PushFront pushes an object to front.

func (*Deque) Slice

func (d *Deque) Slice() []interface{}

Slice converts to slice.

type UnlimitedChannel

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

UnlimitedChannel defines unlimited channel struct.

func NewUnlimitedChannel

func NewUnlimitedChannel() *UnlimitedChannel

NewUnlimitedChannel returns an unlimited channel object.

func (*UnlimitedChannel) Close

func (c *UnlimitedChannel) Close()

Close close the unlimited channel.

func (*UnlimitedChannel) Done

func (c *UnlimitedChannel) Done() <-chan struct{}

Done returns done channel.

func (*UnlimitedChannel) Dump

func (c *UnlimitedChannel) Dump() []interface{}

Dump returns data stuck in channel. Remember there is no lock, so be careful when you call Dump().

func (*UnlimitedChannel) In

func (c *UnlimitedChannel) In() chan<- interface{}

In returns input channel.

func (*UnlimitedChannel) Len

func (c *UnlimitedChannel) Len() uint64

Len returns length of channel. Remember there is no lock, so be careful when you call Len().

func (*UnlimitedChannel) Out

func (c *UnlimitedChannel) Out() <-chan interface{}

Out returns output channel.

Jump to

Keyboard shortcuts

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