1
0
Fork 0
mirror of https://github.com/tmrts/go-patterns.git synced 2025-04-11 04:50:55 +00:00
go-patterns/structural/proxy.md
2017-06-15 18:05:18 +03:00

513 B

Proxy Pattern

The proxy pattern provides an object that controls access to another object, intercepting all calls.

Implementation

The proxy could interface to anything: a network connection, a large object in memory, a file, or some other resource that is expensive or impossible to duplicate.

    // Some short examples

Usage

For usage, see observer/main.go or view in the Playground.