mirror of
https://github.com/mariocandela/beelzebub.git
synced 2025-07-01 18:47:26 -04:00
Feature: non-blocking tracer, changed license (#57)
* refactor tracer, introduce worker to avoid un-blocker trace strategy * fixed unit test and refactor dockerFile * buffered events chan * refactor yaml API core, initial web hook tracing implementations * added banner * changed license from GPL 3 to MIT * Edit readme
This commit is contained in:
@ -14,7 +14,7 @@ import (
|
||||
type BeelzebubCoreConfigurations struct {
|
||||
Core struct {
|
||||
Logging Logging `yaml:"logging"`
|
||||
Tracing Tracing `yaml:"tracing"`
|
||||
Tracings Tracings `yaml:"tracings"`
|
||||
Prometheus Prometheus `yaml:"prometheus"`
|
||||
}
|
||||
}
|
||||
@ -26,11 +26,14 @@ type Logging struct {
|
||||
LogsPath string `yaml:"logsPath,omitempty"`
|
||||
}
|
||||
|
||||
type Tracing struct {
|
||||
RabbitMQEnabled bool `yaml:"rabbitMQEnabled"`
|
||||
RabbitMQURI string `yaml:"rabbitMQURI"`
|
||||
type Tracings struct {
|
||||
RabbitMQ `yaml:"rabbit-mq"`
|
||||
}
|
||||
|
||||
type RabbitMQ struct {
|
||||
Enabled bool `yaml:"enabled"`
|
||||
URI string `yaml:"uri"`
|
||||
}
|
||||
type Prometheus struct {
|
||||
Path string `yaml:"path"`
|
||||
Port string `yaml:"port"`
|
||||
|
@ -2,8 +2,9 @@ package parser
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func mockReadfilebytesConfigurationsCore(filePath string) ([]byte, error) {
|
||||
@ -14,9 +15,10 @@ core:
|
||||
debugReportCaller: false
|
||||
logDisableTimestamp: true
|
||||
logsPath: ./logs
|
||||
tracing:
|
||||
rabbitMQEnabled: true
|
||||
rabbitMQURI: provaMock`)
|
||||
tracings:
|
||||
rabbit-mq:
|
||||
enabled: true
|
||||
uri: "amqp://user:password@localhost/"`)
|
||||
return configurationsCoreBytes, nil
|
||||
}
|
||||
|
||||
@ -80,8 +82,8 @@ func TestReadConfigurationsCoreValid(t *testing.T) {
|
||||
assert.Equal(t, coreConfigurations.Core.Logging.LogDisableTimestamp, true)
|
||||
assert.Equal(t, coreConfigurations.Core.Logging.DebugReportCaller, false)
|
||||
assert.Equal(t, coreConfigurations.Core.Logging.LogsPath, "./logs")
|
||||
assert.Equal(t, coreConfigurations.Core.Tracing.RabbitMQEnabled, true)
|
||||
assert.Equal(t, coreConfigurations.Core.Tracing.RabbitMQURI, "provaMock")
|
||||
assert.Equal(t, coreConfigurations.Core.Tracings.RabbitMQ.Enabled, true)
|
||||
assert.Equal(t, coreConfigurations.Core.Tracings.RabbitMQ.URI, "amqp://user:password@localhost/")
|
||||
}
|
||||
|
||||
func TestReadConfigurationsServicesFail(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user