common

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2019 License: LGPL-3.0 Imports: 1 Imported by: 0

README

common

This directory is used to store common Data Structures.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NonBlockingChan

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

NonBlockingChan will drop new values when full

func NewNonBlockingChan

func NewNonBlockingChan(cap int) *NonBlockingChan

NewNonBlockingChan create a new non-blocking chan

func (*NonBlockingChan) Recv

func (nbCh *NonBlockingChan) Recv() (interface{}, bool)

Recv value from chan

func (*NonBlockingChan) RecvWithDeadline

func (nbCh *NonBlockingChan) RecvWithDeadline(deadline time.Duration) (interface{}, bool)

RecvWithDeadline try to recv value in given duration, the value will be skipped if failed

func (*NonBlockingChan) Send

func (nbCh *NonBlockingChan) Send(value interface{}) bool

Send value into chan

func (*NonBlockingChan) SendWithDeadline

func (nbCh *NonBlockingChan) SendWithDeadline(value interface{}, deadline time.Duration) bool

SendWithDeadline try to send value in given duration, the value will be dropped if failed

Directories

Path Synopsis
dag
pb
Package dagpb is a generated protocol buffer package.
Package dagpb is a generated protocol buffer package.
pb
Package triepb is a generated protocol buffer package.
Package triepb is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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