go-patterns

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2020 License: Apache-2.0

README

Go Patterns

The Go Patterns implements some useful generic design patterns like object registry or object factory.

[[TOC]]

Features

  • It implements object registry design pattern
  • It implements object factory design pattern

Usage

Import the registry package:

import "gitlab.com/tymonx/go-patterns/registry"

Import the factory package:

import "gitlab.com/tymonx/go-patterns/factory"

Import the guard package:

import "gitlab.com/tymonx/go-patterns/guard"

Directories

Path Synopsis
Package factory implements a factory design pattern to create an object with a registered object constructor under a given unique ID string.
Package factory implements a factory design pattern to create an object with a registered object constructor under a given unique ID string.
Package guard implements a mutex wrapper that provides a convenient RAII-style mechanism for owning a mutex for the duration of a scoped block.
Package guard implements a mutex wrapper that provides a convenient RAII-style mechanism for owning a mutex for the duration of a scoped block.
Package registry implements a registry design pattern to registry object under a given unique ID string, allowing registered objects to be reached later or from anywhere when a global registry instance is used.
Package registry implements a registry design pattern to registry object under a given unique ID string, allowing registered objects to be reached later or from anywhere when a global registry instance is used.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL