connector
The Connector
is the most fundamental construct of the framework, providing key capabilities to Microbus
microservices:
The connector
package includes a separate source file for each functional area of the microservice. All these source files implement the same Connector
class.
config.go
is responsible for fetching config values from the configurator core microserviceconnector.go
defines the Connector
struct and provides a few getters and setterscontrol.go
deals with subscribing and handling the control messages on the reserved port :888
fragment.go
orchestrates the fragmentation and defragmentation of large requests and responseslifecycle.go
implements the Startup
and Shutdown
logic, as well as Go
and Parallel
for running code in goroutineslogger.go
provides a JSON logger for the microservicemetrics.go
collects metrics using Prometheusmuffler.go
is an OpenTelemetry span sampler that excludes noisy spanspublish.go
deals with outbound messagingres.go
manages the loading of files and localized strings from a resource FS
selectiveprocessor.go
is an OpenTelemetry processor of tracing spans that exports only spans that are explicitly selectedsubjects.go
crafts the NATS subjects (topics) that a microservice subscribes to or publishes tosubscribe.go
deals with inbound message handlingtelemetry.go
supports distributed tracing with OpenTelemetrytime.go
introduces tickers to the microservice