diodes

package
v72.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2016 License: Apache-2.0, BSD-3-Clause, MIT Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewManyToOne = func(size int, alerter Alerter) *ManyToOne {
	d := &ManyToOne{
		buffer:  make([]unsafe.Pointer, size),
		alerter: alerter,
	}
	d.writeIndex = ^d.writeIndex
	return d
}
View Source
var NewManyToOneEnvelope = func(size int, alerter Alerter) *ManyToOneEnvelope {
	d := &ManyToOneEnvelope{
		buffer:  make([]unsafe.Pointer, size),
		alerter: alerter,
	}
	d.writeIndex = ^d.writeIndex
	return d
}
View Source
var NewOneToOne = func(size int, alerter Alerter) *OneToOne {
	d := &OneToOne{
		buffer:  make([]unsafe.Pointer, size),
		alerter: alerter,
	}
	d.writeIndex = ^d.writeIndex
	return d
}

Functions

This section is empty.

Types

type Alerter

type Alerter interface {
	Alert(missed int)
}

type ManyToOne

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

ManyToOne diode is optimal for many writers and a single reader.

func (*ManyToOne) Next

func (d *ManyToOne) Next() []byte

func (*ManyToOne) Set

func (d *ManyToOne) Set(data []byte)

func (*ManyToOne) TryNext

func (d *ManyToOne) TryNext() ([]byte, bool)

type ManyToOneEnvelope

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

ManyToOneEnvelope diode is optimal for many writers and a single reader.

func (*ManyToOneEnvelope) Next

func (d *ManyToOneEnvelope) Next() *events.Envelope

func (*ManyToOneEnvelope) Set

func (d *ManyToOneEnvelope) Set(data *events.Envelope)

func (*ManyToOneEnvelope) TryNext

func (d *ManyToOneEnvelope) TryNext() (*events.Envelope, bool)

type OneToOne

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

OneToOne diode is optimized for a single writer and a single reader

func (*OneToOne) Next

func (d *OneToOne) Next() []byte

func (*OneToOne) Set

func (d *OneToOne) Set(data []byte)

func (*OneToOne) TryNext

func (d *OneToOne) TryNext() ([]byte, bool)

Jump to

Keyboard shortcuts

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