Skip to content

Commit 25c473d

Browse files
committed
Update README
1 parent 258ef49 commit 25c473d

File tree

1 file changed

+23
-13
lines changed

1 file changed

+23
-13
lines changed

README.md

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,24 @@
55
# Go Patterns [![Travis Widget]][Travis] [![Awesome Widget]][Awesome] [![License Widget]][License]
66
[Awesome Widget]: https://img.shields.io/badge/awesome-%E2%9C%93-ff69b4.svg?style=flat-square
77
[Awesome]: https://github.com/sindresorhus/awesome
8-
[Travis Widget]: https://img.shields.io/travis/tmrts/awesome-google-cloud.svg?style=flat-square
8+
[Travis Widget]: https://img.shields.io/travis/tmrts/go-patterns.svg?style=flat-square
99
[Travis]: http://travis-ci.org/tmrts/go-patterns
1010
[License Widget]: https://img.shields.io/badge/license-Creative%20Commons%204.0-E91E63.svg?style=flat-square
1111
[License]: http://creativecommons.org/licenses/by/4.0/
1212
A curated collection of idiomatic design & application patterns for Go language.
1313

14+
For use cases please see the test files (files suffixed with _test).
15+
1416
__Creational Patterns__:
1517

1618
| Pattern | Description |
1719
|:-------:| ----------- |
1820
| [Abstract Factory](abstract_factory.go) | use a generic function with specific factories |
19-
| [Borg Singleton](borg_singleton.go) | a singleton with shared-state among instances |
20-
| [Builder](builder.go) | instead of using multiple constructors, builder object receives parameters and returns constructed objects |
21+
| [Singleton](singleton/singleton.go) | Restricts instantiation of a class to one object |
22+
| [Builder](builder/builder.go) | instead of using multiple constructors, builder object receives parameters and returns constructed objects |
2123
| [Factory Method](factory_method.go) | delegate a specialized function/method to create instances |
2224
| [Lazy Evaluation](lazy_evaluation.go) | lazily-evaluated property pattern in Go |
23-
| [Object Pool](object_pool.go) | preinstantiate and maintain a group of instances of the same type |
24-
| [Prototype](prototype.go) | use a factory and clones of a prototype for new instances (if instantiation is expensive) |
25+
| [Object Pool](object_pool/pool.go) | Instantiates and maintains a group of objects instances of the same type |
2526

2627
__Structural Patterns__:
2728

@@ -47,23 +48,22 @@ __Behavioral Patterns__:
4748
| [Mediator](mediator.go) | an object that knows how to connect other objects and act as a proxy |
4849
| [Memento](memento.go) | generate an opaque token that can be used to go back to a previous state |
4950
| [Observer](observer.go) | provide a callback for notification of events/changes to data |
50-
| [Publish/Subscribe](publish_subscribe.go) | Passes information to a collection of recipients who subscribed to a topic |
5151
| [Registry](registry.go) | keep track of all subclasses of a given class |
5252
| [Specification](specification.go) | business rules can be recombined by chaining the business rules together using boolean logic |
5353
| [State](state.go) | logic is organized into a discrete number of potential states and the next state that can be transitioned to |
54-
| [Strategy](strategy.go) | Encapsulates an algorithm inside a struct |
54+
| [Strategy](strategy/strategy.go) | Encapsulates an algorithm inside a struct |
5555
| [Template](template.go) | an object imposes a structure but takes pluggable components |
5656
| [Visitor](visitor.go) | invoke a callback for all items of a collection |
5757

5858
__Synchronization Patterns__:
5959

6060
| Pattern | Description |
6161
|:-------:| ----------- |
62-
| [Lock/Mutex](mutex.go) | Enforces mutual exclusion limit on accessing a resource |
62+
| [Lock/Mutex](mutex/mutex.go) | Enforces mutual exclusion limit on accessing a resource |
6363
| [Read-Write Lock](read_write_lock.go) | |
6464
| [Condition Variable](condition_variable.go) | |
65-
| [Monitor](monitor.go) | Combination of mutex and condition patterns |
66-
| [Semaphore](semaphore.go) | Allows controlling access to a common resource |
65+
| [Monitor](monitor.go) | Combination of mutex and condition variable patterns |
66+
| [Semaphore](semaphore/semaphore.go) | Allows controlling access to a common resource |
6767

6868
__Concurrency Patterns__:
6969

@@ -75,16 +75,25 @@ __Concurrency Patterns__:
7575
| [Futures](future.go) | |
7676
| [Broadcast](broadcast.go) | |
7777
| [Multiplex](multiplex.go) | |
78-
| [Fan-In](fan_in.go) | |
7978
| [Generators](generator.go) | |
80-
| [Coroutines](coroutine.go) | |
79+
| [Coroutines](coroutine/coroutine.go) | |
80+
| [Parallelism](parallelism/md5.go) | Completes large number of indenpendent tasks |
81+
| [Bounded Parallelism](bounded_parallelism/md5.go) | Completes large number of indenpendent tasks with resource limits |
82+
83+
__Messaging Patterns__:
84+
| [Fan-In](fan/fan_in.go) | Funnels tasks to a work sink (e.g. server) |
85+
| [Fan-Out](fan/fan_out.go) | Distributes tasks amongs workers |
86+
| [Publish/Subscribe](publish_subscribe.go) | Passes information to a collection of recipients who subscribed to a topic |
87+
| [Request & Reply](fan) | |
88+
| [Push & Pull](fan) | |
89+
8190

8291
__Stability Patterns__:
8392

8493
| Pattern | Description |
8594
|:-------:| ----------- |
8695
| [Bulkheads](bulkhead.go) | |
87-
| [Circuit Breaker](circuit_breaker.go) | |
96+
| [Circuit Breaker](circuitbreaker/circuit_breaker.go) | Stops the flow of the requests when requests are likely to fail |
8897
| [Deadline](deadline.go) | |
8998
| [Fail Fast](fail_fast.go) | |
9099
| [Handshaking](handshaking.go) | |
@@ -106,6 +115,7 @@ __Anti-Patterns__:
106115

107116
| Pattern | Description |
108117
|:-------:| ----------- |
118+
| [Cascading Failures]() | |
109119

110120
__Other Patterns__:
111121

0 commit comments

Comments
 (0)