xonce

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 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 Chan

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

Chan represents a channel that can only be written too once.

func NewChan

func NewChan() *Chan

NewChan returns a Chan.

func (*Chan) Chan

func (c *Chan) Chan() chan interface{}

Chan returns a channel.

func (*Chan) Write

func (c *Chan) Write(v interface{}) (success bool)

Write writes a v.

type Once

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

Once represents an interface that can only be written too once.

type Value

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

Value represents a value that can only be written too once.

func NewValue

func NewValue() *Value

NewValue returns a Value.

func (*Value) Value

func (val *Value) Value() interface{}

Value return a v.

func (*Value) Write

func (val *Value) Write(v interface{}) (success bool)

Write writes a v.

Jump to

Keyboard shortcuts

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