1
0
mirror of https://github.com/tmrts/go-patterns.git synced 2024-11-22 13:06:09 +03:00

"README.md" file future&promises section ticked.

This commit is contained in:
Oğuzhan Kazak 2023-04-30 14:11:30 +03:00
parent 418f3beebb
commit b273c11088

View File

@ -14,7 +14,7 @@ A curated collection of idiomatic design & application patterns for Go language.
## Creational Patterns ## Creational Patterns
| Pattern | Description | Status | | Pattern | Description | Status |
|:-------:|:----------- |:------:| | :----------------------------------------------: | :--------------------------------------------------------------------------------- | :----: |
| [Abstract Factory](/creational/abstract_factory.md) | Provides an interface for creating families of releated objects | ✘ | | [Abstract Factory](/creational/abstract_factory.md) | Provides an interface for creating families of releated objects | ✘ |
| [Builder](/creational/builder.md) | Builds a complex object using simple objects | ✔ | | [Builder](/creational/builder.md) | Builds a complex object using simple objects | ✔ |
| [Factory Method](/creational/factory.md) | Defers instantiation of an object to a specialized function for creating instances | ✔ | | [Factory Method](/creational/factory.md) | Defers instantiation of an object to a specialized function for creating instances | ✔ |
@ -24,7 +24,7 @@ A curated collection of idiomatic design & application patterns for Go language.
## Structural Patterns ## Structural Patterns
| Pattern | Description | Status | | Pattern | Description | Status |
|:-------:|:----------- |:------:| | :--------------------------------: | :------------------------------------------------------------------------------------------- | :----: |
| [Bridge](/structural/bridge.md) | Decouples an interface from its implementation so that the two can vary independently | ✘ | | [Bridge](/structural/bridge.md) | Decouples an interface from its implementation so that the two can vary independently | ✘ |
| [Composite](/structural/composite.md) | Encapsulates and provides access to a number of different objects | ✘ | | [Composite](/structural/composite.md) | Encapsulates and provides access to a number of different objects | ✘ |
| [Decorator](/structural/decorator.md) | Adds behavior to an object, statically or dynamically | ✔ | | [Decorator](/structural/decorator.md) | Adds behavior to an object, statically or dynamically | ✔ |
@ -35,7 +35,7 @@ A curated collection of idiomatic design & application patterns for Go language.
## Behavioral Patterns ## Behavioral Patterns
| Pattern | Description | Status | | Pattern | Description | Status |
|:-------:|:----------- |:------:| | :------------------------------------------------------------: | :--------------------------------------------------------------------------------------------- | :----: |
| [Chain of Responsibility](/behavioral/chain_of_responsibility.md) | Avoids coupling a sender to receiver by giving more than object a chance to handle the request | ✘ | | [Chain of Responsibility](/behavioral/chain_of_responsibility.md) | Avoids coupling a sender to receiver by giving more than object a chance to handle the request | ✘ |
| [Command](/behavioral/command.md) | Bundles a command and arguments to call later | ✘ | | [Command](/behavioral/command.md) | Bundles a command and arguments to call later | ✘ |
| [Mediator](/behavioral/mediator.md) | Connects objects and acts as a proxy | ✘ | | [Mediator](/behavioral/mediator.md) | Connects objects and acts as a proxy | ✘ |
@ -50,7 +50,7 @@ A curated collection of idiomatic design & application patterns for Go language.
## Synchronization Patterns ## Synchronization Patterns
| Pattern | Description | Status | | Pattern | Description | Status |
|:-------:|:----------- |:------:| | :-------------------------------------------------------: | :------------------------------------------------------------------------------------------------- | :----: |
| [Condition Variable](/synchronization/condition_variable.md) | Provides a mechanism for threads to temporarily give up access in order to wait for some condition | ✘ | | [Condition Variable](/synchronization/condition_variable.md) | Provides a mechanism for threads to temporarily give up access in order to wait for some condition | ✘ |
| [Lock/Mutex](/synchronization/mutex.md) | Enforces mutual exclusion limit on a resource to gain exclusive access | ✘ | | [Lock/Mutex](/synchronization/mutex.md) | Enforces mutual exclusion limit on a resource to gain exclusive access | ✘ |
| [Monitor](/synchronization/monitor.md) | Combination of mutex and condition variable patterns | ✘ | | [Monitor](/synchronization/monitor.md) | Combination of mutex and condition variable patterns | ✘ |
@ -60,7 +60,7 @@ A curated collection of idiomatic design & application patterns for Go language.
## Concurrency Patterns ## Concurrency Patterns
| Pattern | Description | Status | | Pattern | Description | Status |
|:-------:|:----------- |:------:| | :-----------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------- | :----: |
| [N-Barrier](/concurrency/barrier.md) | Prevents a process from proceeding until all N processes reach to the barrier | ✘ | | [N-Barrier](/concurrency/barrier.md) | Prevents a process from proceeding until all N processes reach to the barrier | ✘ |
| [Bounded Parallelism](/concurrency/bounded_parallelism.md) | Completes large number of independent tasks with resource limits | ✔ | | [Bounded Parallelism](/concurrency/bounded_parallelism.md) | Completes large number of independent tasks with resource limits | ✔ |
| [Broadcast](/concurrency/broadcast.md) | Transfers a message to all recipients simultaneously | ✘ | | [Broadcast](/concurrency/broadcast.md) | Transfers a message to all recipients simultaneously | ✘ |
@ -73,17 +73,17 @@ A curated collection of idiomatic design & application patterns for Go language.
## Messaging Patterns ## Messaging Patterns
| Pattern | Description | Status | | Pattern | Description | Status |
|:-------:|:----------- |:------:| | :---------------------------------------------------: | :---------------------------------------------------------------------------------------- | :----: |
| [Fan-In](/messaging/fan_in.md) | Funnels tasks to a work sink (e.g. server) | ✔ | | [Fan-In](/messaging/fan_in.md) | Funnels tasks to a work sink (e.g. server) | ✔ |
| [Fan-Out](/messaging/fan_out.md) | Distributes tasks among workers (e.g. producer) | ✔ | | [Fan-Out](/messaging/fan_out.md) | Distributes tasks among workers (e.g. producer) | ✔ |
| [Futures & Promises](/messaging/futures_promises.md) | Acts as a place-holder of a result that is initially unknown for synchronization purposes | | | [Futures & Promises](/messaging/futures_promises.md) | Acts as a place-holder of a result that is initially unknown for synchronization purposes | |
| [Publish/Subscribe](/messaging/publish_subscribe.md) | Passes information to a collection of recipients who subscribed to a topic | ✔ | | [Publish/Subscribe](/messaging/publish_subscribe.md) | Passes information to a collection of recipients who subscribed to a topic | ✔ |
| [Push & Pull](/messaging/push_pull.md) | Distributes messages to multiple workers, arranged in a pipeline | ✘ | | [Push & Pull](/messaging/push_pull.md) | Distributes messages to multiple workers, arranged in a pipeline | |
## Stability Patterns ## Stability Patterns
| Pattern | Description | Status | | Pattern | Description | Status |
|:-------:|:----------- |:------:| | :-------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------- | :----: |
| [Bulkheads](/stability/bulkhead.md) | Enforces a principle of failure containment (i.e. prevents cascading failures) | ✘ | | [Bulkheads](/stability/bulkhead.md) | Enforces a principle of failure containment (i.e. prevents cascading failures) | ✘ |
| [Circuit-Breaker](/stability/circuit-breaker.md) | Stops the flow of the requests when requests are likely to fail | ✔ | | [Circuit-Breaker](/stability/circuit-breaker.md) | Stops the flow of the requests when requests are likely to fail | ✔ |
| [Deadline](/stability/deadline.md) | Allows clients to stop waiting for a response once the probability of response becomes low (e.g. after waiting 10 seconds for a page refresh) | ✘ | | [Deadline](/stability/deadline.md) | Allows clients to stop waiting for a response once the probability of response becomes low (e.g. after waiting 10 seconds for a page refresh) | ✘ |
@ -94,17 +94,17 @@ A curated collection of idiomatic design & application patterns for Go language.
## Profiling Patterns ## Profiling Patterns
| Pattern | Description | Status | | Pattern | Description | Status |
|:-------:|:----------- |:------:| | :-----------------------------------: | :-------------------------------------- | :----: |
| [Timing Functions](/profiling/timing.md) | Wraps a function and logs the execution | ✔ | | [Timing Functions](/profiling/timing.md) | Wraps a function and logs the execution | ✔ |
## Idioms ## Idioms
| Pattern | Description | Status | | Pattern | Description | Status |
|:-------:|:----------- |:------:| | :---------------------------------------------: | :-------------------------------------------------------------------- | :----: |
| [Functional Options](/idiom/functional-options.md) | Allows creating clean APIs with sane defaults and idiomatic overrides | ✔ | | [Functional Options](/idiom/functional-options.md) | Allows creating clean APIs with sane defaults and idiomatic overrides | ✔ |
## Anti-Patterns ## Anti-Patterns
| Pattern | Description | Status | | Pattern | Description | Status |
|:-------:|:----------- |:------:| | :-----------------------------------------------------: | :-------------------------------------------------------------------------------------------------- | :----: |
| [Cascading Failures](/anti-patterns/cascading_failures.md) | A failure in a system of interconnected parts in which the failure of a part causes a domino effect | ✘ | | [Cascading Failures](/anti-patterns/cascading_failures.md) | A failure in a system of interconnected parts in which the failure of a part causes a domino effect | ✘ |