components

package module
v1.0.6-7 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: MIT Imports: 13 Imported by: 0

README

Pip.Services Logo
Component definitions for Golang

This module is a part of the Pip.Services polyglot microservices toolkit.

The Components module contains standard component definitions that can be used to build applications and services.

The module contains the following packages:

  • Auth - authentication credential stores
  • Build - factories
  • Cache - distributed cache
  • Component - the root package
  • Config - configuration readers
  • Connect - connection discovery services
  • Count - performance counters
  • Info - context info
  • Lock - distributed locks
  • Log - logging components
  • Test - test components

Quick links:

Use

Get the package from the Github repository:

go get -u github.com/pip-services3-gox/pip-services3-components-gox@latest

Develop

For development you shall install the following prerequisites:

  • Golang v1.18+
  • Visual Studio Code or another IDE of your choice
  • Docker
  • Git

Run automated tests:

go test -v ./test/...

Generate API documentation:

./docgen.ps1

Before committing changes run dockerized test as:

./test.ps1
./clear.ps1

Contacts

The library is created and maintained by Sergey Seroukhov.

The documentation is written by Levichev Dmitry.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	// contains filtered or unexported fields
}

Abstract component that supportes configurable dependencies, logging and performance counters.

Configuration parameters
	- dependencies:
		- [dependency name 1]: Dependency 1 locator (descriptor)
		- ...
		- [dependency name N]: Dependency N locator (descriptor)
References
	- *:counters:*:*:1.0     (optional) ICounters components to pass collected measurements
	- *:logger:*:*:1.0       (optional) ILogger components to pass log messages
	- *:tracer:*:*:1.0       (optional) ITracer components to trace executed operations
	- ...                                    References must match configured dependencies.

func InheritComponent

func InheritComponent() *Component

func (*Component) Configure

func (c *Component) Configure(ctx context.Context, config *config.ConfigParams)

Configures component by passing configuration parameters.

Parameters:
	- ctx context.Context
	- config    configuration parameters to be set.

func (*Component) SetReferences

func (c *Component) SetReferences(ctx context.Context, references refer.IReferences)

SetReferences sets the component references. References must match configured dependencies.

Parameters:
	- ctx context.Context
	- references IReferences references to set.

Directories

Path Synopsis
log

Jump to

Keyboard shortcuts

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