psmb

GoDoc Go Report Card Build Status CircleCI codecov

Proactive service library for modbusd


Environment variables

Why environment variable? Refer to the 12 factors

Contracts (Interfaces)

Golang package management

Worker Pool Model

Request from upstream

uml

Response from downstream

uml


Up and Running

Docker Compose

docker-compose build --pull
docker-compose up

Manually

Install libzmq (3.2.5)

wget https://github.com/zeromq/zeromq3-x/releases/download/v3.2.5/zeromq-3.2.5.tar.gz
tar xvzf zeromq-3.2.5.tar.gz
cd zeromq-3.2.5
./configure
make
sudo make install
sudo ldconfig

Build

# install glide
curl https://glide.sh/get | sh

# install dependencies
glide install

# build
cd tcp-srv
go build -o psmbtcp-srv

Continuous Integration

I do continuous integration and deploy docker images after git push by self-hosted drone.io server, circleci service, codecov service and dockerhub service.

Deployment Diagram

uml


Unit tests

Test cases

Binary

Types

Upstream structure test

Downstream structure test


UML

uml