mirror of
https://github.com/crazybber/awesome-patterns.git
synced 2024-11-24 13:36:03 +03:00
fix readme
This commit is contained in:
parent
a3638a1084
commit
9cb8114cce
@ -1,4 +1,5 @@
|
|||||||
Fan-In Messaging Patterns
|
# Fan-In Messaging Patterns
|
||||||
|
|
||||||
===================================
|
===================================
|
||||||
Fan-In is a messaging pattern used to create a funnel for work amongst workers (clients: source, server: destination).
|
Fan-In is a messaging pattern used to create a funnel for work amongst workers (clients: source, server: destination).
|
||||||
|
|
||||||
@ -37,4 +38,4 @@ func Merge(cs ...<-chan int) <-chan int {
|
|||||||
|
|
||||||
The `Merge` function converts a list of channels to a single channel by starting a goroutine for each inbound channel that copies the values to the sole outbound channel.
|
The `Merge` function converts a list of channels to a single channel by starting a goroutine for each inbound channel that copies the values to the sole outbound channel.
|
||||||
|
|
||||||
Once all the output goroutines have been started, `Merge` a goroutine is started to close the main channel.
|
Once all the output goroutine have been started, `Merge` a goroutine is started to close the main channel.
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
Fan-Out Messaging Pattern
|
# Fan-Out Messaging Pattern
|
||||||
|
|
||||||
=========================
|
=========================
|
||||||
Fan-Out is a messaging pattern used for distributing work amongst workers (producer: source, consumers: destination).
|
Fan-Out is a messaging pattern used for distributing work amongst workers (producer: source, consumers: destination).
|
||||||
|
|
||||||
|
@ -2,9 +2,10 @@ package messaging
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"go.uber.org/zap"
|
|
||||||
"sync"
|
"sync"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
|
|
||||||
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
Loading…
Reference in New Issue
Block a user