Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/butuzov/harmony
/ functions
Functions
62 in github.com/butuzov/harmony
⨍
Functions
62
◇
Types & classes
2
↓ 16 callers
Function
generateNumberSequence
(start, finish int)
testing_test.go:67
↓ 8 callers
Function
OrDoneWithContext
--- OrDone Pattern --------------------------------------------------------- OrDoneWithContext will return a new unbuffered channel of type `T` that
with_context.go:136
↓ 7 callers
Function
FututeWithContext
--- Future Pattern --------------------------------------------------------- FututeWithContext[T any] will return buffered channel of size 1 and gene
with_context.go:115
↓ 5 callers
Function
OrDone
--- OrDone Pattern --------------------------------------------------------- OrDone will return a new unbuffered channel of type `T` that serves as a
with_done.go:136
↓ 5 callers
Function
PipelineWithContext
--- Pipeline Pattern ------------------------------------------------------- PipelineWithContext returns the channel of generic type `T2` that can se
with_context.go:175
↓ 4 callers
Function
FanInWithContext
--- Fan-in Pattern --------------------------------------------------------- FanInWithContext returns unbuffered channel of generic type `T` which se
with_context.go:61
↓ 3 callers
Function
QueueWithContext
--- Queue Pattern ----------------------------------------------------------- QueueWithContext returns an unbuffered channel that is populated by func
with_context.go:229
↓ 3 callers
Function
Tee
--- Tee Pattern ------------------------------------------------------------- Tee will return two channels of generic type `T` used to fan-out data fr
with_done.go:256
↓ 3 callers
Function
TeeWithContext
--- Tee Pattern ------------------------------------------------------------- TeeWithContext will return two channels of generic type `T` used to fan-
with_context.go:256
↓ 3 callers
Function
WorkerPoolWithContext
--- WorkerPool Pattern ----------------------------------------------------- WorkerPoolWithContext accepts channel of generic type `T` which is used
with_context.go:293
↓ 3 callers
Function
pass
(done <-chan struct{}, wg *sync.WaitGroup, out chan<- T, in <-chan T)
with_done.go:88
↓ 3 callers
Function
passWithContext
(ctx context.Context, wg *sync.WaitGroup, out chan<- T, in <-chan T)
with_context.go:88
↓ 2 callers
Function
Bridge
--- Bridge Pattern --------------------------------------------------------- Bridge will return chan of generic type `T` used a pipe for the values r
with_done.go:19
↓ 2 callers
Function
BridgeWithContext
--- Bridge Pattern --------------------------------------------------------- BridgeWithContext will return chan of generic type `T` used a pipe for t
with_context.go:19
↓ 2 callers
Function
FanIn
--- Fan-in Pattern --------------------------------------------------------- FanIn returns unbuffered channel of generic type `T` which serves as del
with_done.go:61
↓ 2 callers
Function
Futute
--- Future Pattern --------------------------------------------------------- Futute[T any] will return buffered channel of size 1 and generic type `T
with_done.go:115
↓ 2 callers
Function
Pipeline
--- Pipeline Pattern ------------------------------------------------------- Pipeline returns the channel of generic type `T2` that can serve as a pi
with_done.go:175
↓ 2 callers
Function
Queue
--- Queue Pattern ----------------------------------------------------------- Queue returns an unbuffered channel that is populated by func `genFn`. C
with_done.go:229
↓ 2 callers
Function
WorkerPool
--- WorkerPool Pattern ----------------------------------------------------- WorkerPool accepts channel of generic type `T` which is used to serve jo
with_done.go:293
↓ 2 callers
Function
sortKeyDesc
(m map[string]string)
cmd/internal/gendone/main.go:72
Function
ExampleFanInWithContext
()
examples_test.go:21
Function
ExampleFututeWithContext
()
examples_test.go:93
Function
ExampleFututeWithContext_dogs_as_service
FututeWithContext is shows creation of two "futures" that are used in our "rate our dogs" startup.
examples_test.go:50
Function
ExampleOrWithContext_Fibonacci
ExampleOrWithContext - shows how many fibonacci sequence numbers we can generate in one millisecond.
examples_test.go:104
Function
ExamplePipelineWithContext_Primes
()
examples_test.go:140
Function
ExampleQueueWithContext
Generate fibonacci sequence
examples_test.go:185
Function
ExampleTeeWithDone
()
examples_test.go:216
Function
ExampleWorkerPoolWithContext_Primes
()
examples_test.go:251
Function
Example_fastestSqrt
Other Examples What SQRT funtion is faster? Complex example that shows the combination of few patterns Queue, Tee, FanIn patterns.
examples_test.go:305
Function
TestBridge
--- Bridge Pattern ---------------------------------------------------------
with_done_test.go:17
Function
TestBridgeWithContext
--- Bridge Pattern ---------------------------------------------------------
with_context_test.go:17
Function
TestBridgeWithContextNil
(t *testing.T)
with_context_test.go:58
Function
TestBridge_WhereDoneNil
(t *testing.T)
with_done_test.go:58
Function
TestFanIn
--- Fan-in Pattern ---------------------------------------------------------
with_done_test.go:71
Function
TestFanInWithContext
--- Fan-in Pattern ---------------------------------------------------------
with_context_test.go:71
Function
TestFanInWithContextNil
(t *testing.T)
with_context_test.go:104
Function
TestFanIn_WhereDoneNil
(t *testing.T)
with_done_test.go:104
Function
TestFutute
--- Future Pattern ---------------------------------------------------------
with_done_test.go:121
Function
TestFututeWithContext
--- Future Pattern ---------------------------------------------------------
with_context_test.go:121
Function
TestFututeWithContextNil
(t *testing.T)
with_context_test.go:164
Function
TestFutute_WhereDoneNil
(t *testing.T)
with_done_test.go:164
Function
TestOr
--- OrDone Pattern ---------------------------------------------------------
with_done_test.go:177
Function
TestOrWithContext
--- OrDone Pattern ---------------------------------------------------------
with_context_test.go:177
Function
TestOrWithContextNil
(t *testing.T)
with_context_test.go:223
Function
TestOr_WhereDoneNil
(t *testing.T)
with_done_test.go:223
Function
TestPipeline
--- Pipeline Pattern -------------------------------------------------------
with_done_test.go:236
Function
TestPipelineWithContext
--- Pipeline Pattern -------------------------------------------------------
with_context_test.go:236
Function
TestPipelineWithContextNil
(t *testing.T)
with_context_test.go:269
Function
TestPipeline_WhereDoneNil
(t *testing.T)
with_done_test.go:269
Function
TestQueue
--- Queue Pattern -----------------------------------------------------------
with_done_test.go:282
Function
TestQueueWithContext
--- Queue Pattern -----------------------------------------------------------
with_context_test.go:282
Function
TestQueueWithContextNil
(t *testing.T)
with_context_test.go:319
Function
TestQueue_WhereDoneNil
(t *testing.T)
with_done_test.go:319
Function
TestTee
--- Tee Pattern -------------------------------------------------------------
with_done_test.go:332
Function
TestTeeWithContext
--- Tee Pattern -------------------------------------------------------------
with_context_test.go:332
Function
TestTeeWithContextNil
(t *testing.T)
with_context_test.go:390
Function
TestTee_WhereDoneNil
(t *testing.T)
with_done_test.go:390
Function
TestWorkerPool
--- WorkerPool Pattern -----------------------------------------------------
with_done_test.go:403
Function
TestWorkerPoolWithContext
--- WorkerPool Pattern -----------------------------------------------------
with_context_test.go:403
Function
TestWorkerPoolWithContextNil
(t *testing.T)
with_context_test.go:447
Function
TestWorkerPool_WhereDoneNil
(t *testing.T)
with_done_test.go:447
Function
main
()
cmd/internal/gendone/main.go:10