xbarrier

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 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 ReadBarrier

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

ReadBarrier is a read barrier.

func NewReadBarrier

func NewReadBarrier(ctx context.Context, readChannel <-chan interface{}) *ReadBarrier

NewReadBarrier returns a NewReadBarrier.

func (*ReadBarrier) Read

func (r *ReadBarrier) Read() (val interface{}, success bool)

Read data from the readChannel channel.

type Reader

type Reader interface {
	Read() (val interface{}, success bool)
}

Reader is a read option.

type WriteBarrier

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

WriteBarrier is a write barrier.

func NewWriteBarrier

func NewWriteBarrier(ctx context.Context, writeChannel chan<- interface{}) *WriteBarrier

NewWriteBarrier returns a WriteBarrier.

func (*WriteBarrier) Write

func (w *WriteBarrier) Write(v interface{}) (success bool)

Write the value to the writeChannel channel.

type Writer

type Writer interface {
	Write(v interface{}) (success bool)
}

Writer is a write option.

Jump to

Keyboard shortcuts

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