Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cloudfoundry/go-diodes
/ functions
Functions
38 in github.com/cloudfoundry/go-diodes
⨍
Functions
38
◇
Types & classes
13
↓ 32 callers
Method
TryNext
()
poller.go:11
↓ 23 callers
Method
Set
(GenericDataType)
poller.go:10
↓ 14 callers
Method
Next
Next polls the diode until data is available or until the context is done. If the context is done, then nil will be returned.
poller.go:58
↓ 4 callers
Method
Next
Next returns the next data point on the wrapped diode. If there is no new data, it will wait for Set to be called or the context to be done. If the co
waiter.go:59
↓ 4 callers
Method
Set
Set invokes the wrapped diode's Set with the given data and uses broadcast to wake up any readers.
waiter.go:43
↓ 4 callers
Function
newSpyAlerter
()
one_to_one_test.go:167
↓ 2 callers
Method
Alert
(missed int)
one_to_one.go:14
↓ 2 callers
Function
drainChannel
(c chan []byte)
benchmarks_test.go:269
↓ 1 callers
Method
broadcast
broadcast sends to the channel if it can.
waiter.go:49
↓ 1 callers
Method
isDone
()
poller.go:73
↓ 1 callers
Function
randDataGen
()
benchmarks_test.go:279
Method
Alert
(missed int)
one_to_one_test.go:173
Method
Alert
Alert calls f(missed)
one_to_one.go:22
Function
BenchmarkChannel
(b *testing.B)
benchmarks_test.go:119
Function
BenchmarkChannelDrain
(b *testing.B)
benchmarks_test.go:188
Function
BenchmarkManyToOnePoller
(b *testing.B)
benchmarks_test.go:71
Function
BenchmarkManyToOneWaiter
(b *testing.B)
benchmarks_test.go:95
Function
BenchmarkManyWritersChannel
(b *testing.B)
benchmarks_test.go:240
Function
BenchmarkManyWritersDiode
(b *testing.B)
benchmarks_test.go:212
Function
BenchmarkOneToOnePoller
(b *testing.B)
benchmarks_test.go:23
Function
BenchmarkOneToOnePollerDrain
(b *testing.B)
benchmarks_test.go:141
Function
BenchmarkOneToOneWaiter
(b *testing.B)
benchmarks_test.go:47
Function
BenchmarkOneToOneWaiterDrain
(b *testing.B)
benchmarks_test.go:165
Function
NewManyToOne
NewManyToOne creates a new diode (ring buffer). The ManyToOne diode is optimzed for many writers (on go-routines B-n) and a single reader (on go-routi
many_to_one.go:23
Function
NewOneToOne
NewOneToOne creates a new diode is meant to be used by a single reader and a single writer. The alerter is invoked on the read's go-routine. It is cal
one_to_one.go:44
Function
NewPoller
NewPoller returns a new Poller that wraps the given diode.
poller.go:42
Function
NewWaiter
NewWaiter returns a new Waiter that wraps the given diode.
waiter.go:28
Method
Set
Set sets the data in the next slot of the ring buffer.
one_to_one.go:56
Method
Set
Set sets the data in the next slot of the ring buffer.
many_to_one.go:41
Method
Set
(data diodes.GenericDataType)
poller_test.go:64
Function
TestDiodes
(t *testing.T)
diodes_suite_test.go:10
Function
TestMain
(m *testing.M)
benchmarks_test.go:17
Method
TryNext
TryNext will attempt to read from the next slot of the ring buffer. If there is no data available, it will return (nil, false).
one_to_one.go:70
Method
TryNext
TryNext will attempt to read from the next slot of the ring buffer. If there is not data available, it will return (nil, false).
many_to_one.go:70
Method
TryNext
()
poller_test.go:70
Function
WithPollingContext
WithPollingContext sets the context to cancel any retrieval (Next()). It will not change any results for adding data (Set()). Default is context.Backg
poller.go:35
Function
WithPollingInterval
WithPollingInterval sets the interval at which the diode is queried for new data. The default is 10ms.
poller.go:26
Function
WithWaiterContext
WithWaiterContext sets the context to cancel any retrieval (Next()). It will not change any results for adding data (Set()). Default is context.Backgr
waiter.go:21