baseRoutine/

directory
Version: v5.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: MIT

README

Vostok/baseRoutine example

To go back to Vostok: here.


Introduction

The code here is about creating routine within a pure Vostok server project.

This example illustrates several things:

  • the way 'routines' can be created and released
  • how logging from a routine affects the logs

Top


Building the project & starting the server

To build

go build -i -o $GOPATH/src/bitbucket.org/oscaroscar/vostok/examples/baseRoutine/bin/baseRoutine -v bitbucket.org/oscaroscar/vostok/examples/baseRoutine/go

To run:

cd $GOPATH/src/bitbucket.org/oscaroscar/vostok/examples/baseRoutine && ./bin/baseRoutine -config=conf/example.dev.localhost.json

One-liner for building and restarting right away (assuming the previous cd has been run):

go build -i -o bin/baseRoutine -v ./go && ./bin/baseRoutine -config=conf/example.dev.localhost.json

Top


To test

curl http://localhost:10101/routineexample?action=testbaseroutine

Top


Let's see what's happening

  • Logs are created from routines, and the line prefixes reflect the scope that each routine represents
  • Some log lines are about the routine pool. But not all of them appear. They depend on the configure LogThreshold

Top


Directories

Path Synopsis

Jump to

Keyboard shortcuts

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