Skip to content

Commit 418cd23

Browse files
committed
SUMMARY: index pattern sections
1 parent f009bea commit 418cd23

File tree

3 files changed

+135
-52
lines changed

3 files changed

+135
-52
lines changed

README.md

+52-52
Original file line numberDiff line numberDiff line change
@@ -15,105 +15,105 @@ A curated collection of idiomatic design & application patterns for Go language.
1515

1616
| Pattern | Description | Status |
1717
|:-------:|:----------- |:------:|
18-
| [Abstract Factory](creational/abstract_factory.md) | Provides an interface for creating families of releated objects ||
19-
| [Builder](creational/builder.md) | Builds a complex object using simple objects ||
20-
| [Factory Method](creational/factory.md) | Defers instantiation of an object to a specialized function for creating instances ||
21-
| [Object Pool](creational/object_pool.md) | Instantiates and maintains a group of objects instances of the same type ||
22-
| [Singleton](creational/singleton.md) | Restricts instantiation of a type to one object ||
18+
| [Abstract Factory](/creational/abstract_factory.md) | Provides an interface for creating families of releated objects ||
19+
| [Builder](/creational/builder.md) | Builds a complex object using simple objects ||
20+
| [Factory Method](/creational/factory.md) | Defers instantiation of an object to a specialized function for creating instances ||
21+
| [Object Pool](/creational/object_pool.md) | Instantiates and maintains a group of objects instances of the same type ||
22+
| [Singleton](/creational/singleton.md) | Restricts instantiation of a type to one object ||
2323

2424
## Structural Patterns
2525

2626
| Pattern | Description | Status |
2727
|:-------:|:----------- |:------:|
28-
| [Adapter](structural/.md) | Adapts otherwise incompatible interfaces to work together by adapting one to the other ||
29-
| [Bridge](structural/bridge.md) | Decouples an interface from its implementation so that the two can vary independently ||
30-
| [Composite](structural/composite.md) | Encapsulates and provides access to a number of different objects ||
31-
| [Decorator](structural/decorator.md) | Adds behavior to an object, statically or dynamically ||
32-
| [Facade](structural/facade.md) | Uses one type as an API to a number of others ||
33-
| [Flyweight](structural/flyweight.md) | Reuses existing instances of objects with similar/identical state to minimize resource usage ||
34-
| [Model View Controller](structural/model_view_controller.md) | Divides an app into three interconnected parts to separate internal representation from presentation to user ||
35-
| [Proxy](structural/proxy.md) | Provides a surrogate for an object to control it's actions ||
28+
| [Adapter](/structural/adapter.md) | Adapts otherwise incompatible interfaces to work together by adapting one to the other ||
29+
| [Bridge](/structural/bridge.md) | Decouples an interface from its implementation so that the two can vary independently ||
30+
| [Composite](/structural/composite.md) | Encapsulates and provides access to a number of different objects ||
31+
| [Decorator](/structural/decorator.md) | Adds behavior to an object, statically or dynamically ||
32+
| [Facade](/structural/facade.md) | Uses one type as an API to a number of others ||
33+
| [Flyweight](/structural/flyweight.md) | Reuses existing instances of objects with similar/identical state to minimize resource usage ||
34+
| [Model View Controller](/structural/model_view_controller.md) | Divides an app into three interconnected parts to separate internal representation from presentation to user ||
35+
| [Proxy](/structural/proxy.md) | Provides a surrogate for an object to control it's actions ||
3636

3737
## Behavioral Patterns
3838

3939
| Pattern | Description | Status |
4040
|:-------:|:----------- |:------:|
41-
| [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 ||
42-
| [Command](behavioral/command.md) | Bundles a command and arguments to call later ||
43-
| [Mediator](behavioral/mediator.md) | Connects objects and acts as a proxy ||
44-
| [Memento](behavioral/memento.md) | Generate an opaque token that can be used to go back to a previous state ||
45-
| [Observer](behavioral/observer.md) | Provide a callback for notification of events/changes to data ||
46-
| [Registry](behavioral/registry.md) | Keep track of all subclasses of a given class ||
47-
| [State](behavioral/state.md) | Encapsulates varying behavior for the same object based on its internal state ||
48-
| [Strategy](behavioral/strategy.md) | Enables an algorithm's behavior to be selected at runtime ||
49-
| [Template](behavioral/template.md) | Defines a skeleton class which defers some methods to subclasses ||
50-
| [Visitor](behavioral/visitor.md) | Separates an algorithm from an object on which it operates ||
41+
| [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 ||
42+
| [Command](/behavioral/command.md) | Bundles a command and arguments to call later ||
43+
| [Mediator](/behavioral/mediator.md) | Connects objects and acts as a proxy ||
44+
| [Memento](/behavioral/memento.md) | Generate an opaque token that can be used to go back to a previous state ||
45+
| [Observer](/behavioral/observer.md) | Provide a callback for notification of events/changes to data ||
46+
| [Registry](/behavioral/registry.md) | Keep track of all subclasses of a given class ||
47+
| [State](/behavioral/state.md) | Encapsulates varying behavior for the same object based on its internal state ||
48+
| [Strategy](/behavioral/strategy.md) | Enables an algorithm's behavior to be selected at runtime ||
49+
| [Template](/behavioral/template.md) | Defines a skeleton class which defers some methods to subclasses ||
50+
| [Visitor](/behavioral/visitor.md) | Separates an algorithm from an object on which it operates ||
5151

5252
## Synchronization Patterns
5353

5454
| Pattern | Description | Status |
5555
|:-------:|:----------- |:------:|
56-
| [Condition Variable](synchronization/condition_variable.md) | Provides a mechanism for threads to temporarily give up access in order to wait for some condition ||
57-
| [Lock/Mutex](synchronization/mutex.md) | Enforces mutual exclusion limit on a resource to gain exclusive access ||
58-
| [Monitor](synchronization/monitor.md) | Combination of mutex and condition variable patterns ||
59-
| [Read-Write Lock](synchronization/read_write_lock.md) | Allows parallel read access, but only exclusive access on write operations to a resource ||
60-
| [Semaphore](synchronization/semaphore.md) | Allows controlling access to a common resource ||
56+
| [Condition Variable](/synchronization/condition_variable.md) | Provides a mechanism for threads to temporarily give up access in order to wait for some condition ||
57+
| [Lock/Mutex](/synchronization/mutex.md) | Enforces mutual exclusion limit on a resource to gain exclusive access ||
58+
| [Monitor](/synchronization/monitor.md) | Combination of mutex and condition variable patterns ||
59+
| [Read-Write Lock](/synchronization/read_write_lock.md) | Allows parallel read access, but only exclusive access on write operations to a resource ||
60+
| [Semaphore](/synchronization/semaphore.md) | Allows controlling access to a common resource ||
6161

6262
## Concurrency Patterns
6363

6464
| Pattern | Description | Status |
6565
|:-------:|:----------- |:------:|
66-
| [N-Barrier](concurrency/barrier.md) | Prevents a process from proceeding until all N processes reach to the barrier ||
67-
| [Bounded Parallelism](concurrency/bounded_parallelism.md) | Completes large number of independent tasks with resource limits ||
68-
| [Broadcast](concurrency/broadcast.md) | Transfers a message to all recipients simultaneously ||
69-
| [Coroutines](concurrency/coroutine.md) | Subroutines that allow suspending and resuming execution at certain locations ||
70-
| [Generators](concurrency/generator.md) | Yields a sequence of values one at a time ||
71-
| [Reactor](concurrency/reactor.md) | Demultiplexes service requests delivered concurrently to a service handler and dispatches them syncronously to the associated request handlers ||
72-
| [Parallelism](concurrency/parallelism.md) | Completes large number of independent tasks ||
73-
| [Producer Consumer](concurrency/producer_consumer.md) | Separates tasks from task executions ||
74-
| [Scheduler](concurrency/scheduler.md) | Orchestrates steps to be performed as part of a task ||
66+
| [N-Barrier](/concurrency/barrier.md) | Prevents a process from proceeding until all N processes reach to the barrier ||
67+
| [Bounded Parallelism](/concurrency/bounded_parallelism.md) | Completes large number of independent tasks with resource limits ||
68+
| [Broadcast](/concurrency/broadcast.md) | Transfers a message to all recipients simultaneously ||
69+
| [Coroutines](/concurrency/coroutine.md) | Subroutines that allow suspending and resuming execution at certain locations ||
70+
| [Generators](/concurrency/generator.md) | Yields a sequence of values one at a time ||
71+
| [Reactor](/concurrency/reactor.md) | Demultiplexes service requests delivered concurrently to a service handler and dispatches them syncronously to the associated request handlers ||
72+
| [Parallelism](/concurrency/parallelism.md) | Completes large number of independent tasks ||
73+
| [Producer Consumer](/concurrency/producer_consumer.md) | Separates tasks from task executions ||
74+
| [Scheduler](/concurrency/scheduler.md) | Orchestrates steps to be performed as part of a task ||
7575

7676
## Messaging Patterns
7777

7878
| Pattern | Description | Status |
7979
|:-------:|:----------- |:------:|
80-
| [Fan-In](messaging/fan_in.md) | Funnels tasks to a work sink (e.g. server) ||
81-
| [Fan-Out](messaging/fan_out.md) | Distributes tasks among workers (e.g. producer) ||
82-
| [Futures & Promises](messaging/futures_promises.md) | Acts as a place-holder of a result that is initially unknown for synchronization purposes ||
83-
| [Publish/Subscribe](messaging/publish_subscribe.md) | Passes information to a collection of recipients who subscribed to a topic ||
84-
| [Push & Pull](messaging/push_pull.md) | Distributes messages to multiple workers, arranged in a pipeline ||
80+
| [Fan-In](/messaging/fan_in.md) | Funnels tasks to a work sink (e.g. server) ||
81+
| [Fan-Out](/messaging/fan_out.md) | Distributes tasks among workers (e.g. producer) ||
82+
| [Futures & Promises](/messaging/futures_promises.md) | Acts as a place-holder of a result that is initially unknown for synchronization purposes ||
83+
| [Publish/Subscribe](/messaging/publish_subscribe.md) | Passes information to a collection of recipients who subscribed to a topic ||
84+
| [Push & Pull](/messaging/push_pull.md) | Distributes messages to multiple workers, arranged in a pipeline ||
8585

8686
## Stability Patterns
8787

8888
| Pattern | Description | Status |
8989
|:-------:|:----------- |:------:|
90-
| [Bulkheads](stability/bulkhead.md) | Enforces a principle of failure containment (i.e. prevents cascading failures) ||
91-
| [Circuit-Breaker](stability/circuit_breaker.md) | Stops the flow of the requests when requests are likely to fail ||
92-
| [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) ||
93-
| [Fail-Fast](stability/fail_fast.md) | Checks the availability of required resources at the start of a request and fails if the requirements are not satisfied ||
94-
| [Handshaking](stability/handshaking.md) | Asks a component if it can take any more load, if it can't the request is declined ||
95-
| [Steady-State](stability/steady_state.md) | For every service that accumulates a resource, some other service must recycle that resource ||
90+
| [Bulkheads](/stability/bulkhead.md) | Enforces a principle of failure containment (i.e. prevents cascading failures) ||
91+
| [Circuit-Breaker](/stability/circuit_breaker.md) | Stops the flow of the requests when requests are likely to fail ||
92+
| [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) ||
93+
| [Fail-Fast](/stability/fail_fast.md) | Checks the availability of required resources at the start of a request and fails if the requirements are not satisfied ||
94+
| [Handshaking](/stability/handshaking.md) | Asks a component if it can take any more load, if it can't the request is declined ||
95+
| [Steady-State](/stability/steady_state.md) | For every service that accumulates a resource, some other service must recycle that resource ||
9696

9797
## Profiling Patterns
9898

9999
| Pattern | Description | Status |
100100
|:-------:|:----------- |:------:|
101-
| [Timing Functions](profiling/timing.md) | Wraps a function and logs the execution ||
101+
| [Timing Functions](/profiling/timing.md) | Wraps a function and logs the execution ||
102102

103103
## Idioms
104104

105105
| Pattern | Description | Status |
106106
|:-------:|:----------- |:------:|
107-
| [Functional Options](idiom/functional-options.md) | Allows creating clean APIs with sane defaults and idiomatic overrides ||
107+
| [Functional Options](/idiom/functional-options.md) | Allows creating clean APIs with sane defaults and idiomatic overrides ||
108108

109109
## Anti-Patterns
110110

111111
| Pattern | Description | Status |
112112
|:-------:|:----------- |:------:|
113-
| [Cascading Failures](antipatterns/cascading_failures.md) | A failure in a system of interconnected parts in which the failure of a part causes a domino effect ||
113+
| [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 ||
114114

115115
## Other Patterns
116116

117117
| Pattern | Description | Status |
118118
|:-------:|:----------- |:------:|
119-
| | | | |
119+
| | | |

SUMMARY.md

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Summary
2+
3+
* [Go Patterns](/README.md)
4+
* [Creational Patterns](/README.md#creational-patterns)
5+
* [Abstract Factory](/creational/abstract_factory.md)
6+
* [Builder](/creational/builder.md)
7+
* [Factory Method](/creational/factory.md)
8+
* [Object Pool](/creational/object_pool.md)
9+
* [Singleton](/creational/singleton.md)
10+
* [Structural Patterns](/README.md#structural-patterns)
11+
* [Adapter](/structural/adapter.md)
12+
* [Bridge](/structural/bridge.md)
13+
* [Composite](/structural/composite.md)
14+
* [Decorator](/structural/decorator.md)
15+
* [Facade](/structural/facade.md)
16+
* [Flyweight](/structural/flyweight.md)
17+
* [Model View Controller](/structural/model_view_controller.md)
18+
* [Proxy](/structural/proxy.md)
19+
* [Behavioral Patterns](/README.md#behavioral-patterns)
20+
* [Chain of Responsibility](/behavioral/chain_of_responsibility.md)
21+
* [Command](/behavioral/command.md)
22+
* [Mediator](/behavioral/mediator.md)
23+
* [Memento](/behavioral/memento.md)
24+
* [Observer](/behavioral/observer.md)
25+
* [Registry](/behavioral/registry.md)
26+
* [State](/behavioral/state.md)
27+
* [Strategy](/behavioral/strategy.md)
28+
* [Template](/behavioral/template.md)
29+
* [Visitor](/behavioral/visitor.md)
30+
* [Synchronization Patterns](/README.md#synchronization-patterns)
31+
* [Condition Variable](/synchronization/condition_variable.md)
32+
* [Lock/Mutex](/synchronization/mutex.md)
33+
* [Monitor](/synchronization/monitor.md)
34+
* [Read-Write Lock](/synchronization/read_write_lock.md)
35+
* [Semaphore](/synchronization/semaphore.md)
36+
* [Concurrency Patterns](/README.md#concurrency-patterns)
37+
* [N-Barrier](/concurrency/barrier.md)
38+
* [Bounded Parallelism](/concurrency/bounded_parallelism.md)
39+
* [Broadcast](/concurrency/broadcast.md)
40+
* [Coroutines](/concurrency/coroutine.md)
41+
* [Generators](/concurrency/generator.md)
42+
* [Reactor](/concurrency/reactor.md)
43+
* [Parallelism](/concurrency/parallelism.md)
44+
* [Producer Consumer](/concurrency/producer_consumer.md)
45+
* [Scheduler](/concurrency/scheduler.md)
46+
* [Messaging Patterns](/README.md#messaging-patterns)
47+
* [Fan-In](/messaging/fan_in.md)
48+
* [Fan-Out](/messaging/fan_out.md)
49+
* [Futures & Promises](/messaging/futures_promises.md)
50+
* [Publish/Subscribe](/messaging/publish_subscribe.md)
51+
* [Push & Pull](/messaging/push_pull.md)
52+
* [Stability Patterns](/README.md#stability-patterns)
53+
* [Bulkheads](/stability/bulkhead.md)
54+
* [Circuit-Breaker](/stability/circuit_breaker.md)
55+
* [Deadline](/stability/deadline.md)
56+
* [Fail-Fast](/stability/fail_fast.md)
57+
* [Handshaking](/stability/handshaking.md)
58+
* [Steady-State](/stability/steady_state.md)
59+
* [Profiling Patterns](/README.md#profiling-patterns)
60+
* [Timing Functions](/profiling/timing.md)
61+
* [Idioms](/README.md#idioms)
62+
* [Functional Options](/idiom/functional-options.md)
63+
* [Anti-Patterns](/README.md#anti-patterns)
64+
* [Cascading Failures](/anti-patterns/cascading_failures.md)
65+
* [Other Patterns](/README.md#other-patterns)
66+
* [Contributing](/CONTRIBUTING.md)

book.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"plugins": [
3+
"-search",
4+
"-lunr",
5+
"github",
6+
"edit-link"
7+
],
8+
"pluginsConfig": {
9+
"github": {
10+
"url": "https://github.com/tmrts/go-patterns"
11+
},
12+
"edit-link": {
13+
"base": "https://github.com/tmrts/go-patterns/edit/master/",
14+
"label": ""
15+
}
16+
}
17+
}

0 commit comments

Comments
 (0)