VividCortex is always seeking opportunities to contribute to the open-source community. It is a priority as we develop our own product, and we are thankful our team wants to share. Below are a few projects we have done lately. Take a look and let us know if they spark your interest.
Package PM: Processlist manager with TCP listener (Github)
Package pm is a process manager with an HTTP monitoring/control interface. We use it to inspect and manage API server programs by clearly viewing the status of each process.
Processes or tasks are user-defined routines within a running Go program; the routines handling client requests in a web server is an example. This package tracks them and displays that information through an HTTP interface. Client tools connecting to the latter can monitor active tasks through access to the full status history with timing data.
Multitick: A multiplexor for aligned time.Time tickers in Go (Github)
This package is a wrapper around a single
time.Tickerin the Go language, which provides a way for many listeners to subscribe to a single set of ticks. If a subscriber is busy and cannot receive a tick, it will be discarded; the implementation is non-blocking. Additionally, ticks can be aligned to a specific boundary easily, which eliminates annoying code from your programs.
We use this functionality to help coordinate worker goroutines, driving them by passing them ticker channels. This makes the workers more testable, by avoiding nondeterministic use of
Daemonize Go applications with exec() instead of fork().
You cannot daemonize the usual way in Go because daemonizing is a Unix concept that requires some specific things you cannot do easily in Go. You can still accomplish the same goals if you do not mind your program starting copies of itself several times.
We chose to implement this package because we need to run one of our processes as a daemon with the usual attributes of a daemon, but care should be taken by others considering this approach as it is not compatible with all Go routines.