Documentation ¶
Index ¶
- Variables
- func NewRequestLogging(c *fasthttp.RequestCtx, queryArgs []byte, headers []byte, currentDate string, ...) models.RequestLogging
- func PublishLog(reqLogging *models.RequestLogging)
- func PublishRabbit(reqLogging *models.RequestLogging)
- func StartDispatcher(nworkers int)
- type LogWorkRequest
- type Worker
Constants ¶
This section is empty.
Variables ¶
View Source
var LogWorkQueue chan chan LogWorkRequest
View Source
var LoggingRemoveOld = map[string]interface{}{ "Oracle": providers.RemoveOldLogsOracle, "Elastic": providers.RemoveOldLogsElastic, }
View Source
var LoggingType = map[string]interface{}{ "Rabbit": PublishRabbit, "Elastic": providers.PublishElastic, "Oracle": providers.PublishOracle}
View Source
var WorkQueue = make(chan LogWorkRequest, 1000)
Functions ¶
func NewRequestLogging ¶
func NewRequestLogging(c *fasthttp.RequestCtx, queryArgs []byte, headers []byte, currentDate string, elapsedTime int64, serviceName string, indexName string) models.RequestLogging
func PublishLog ¶
func PublishLog(reqLogging *models.RequestLogging)
func PublishRabbit ¶
func PublishRabbit(reqLogging *models.RequestLogging)
func StartDispatcher ¶
func StartDispatcher(nworkers int)
Types ¶
type LogWorkRequest ¶
type LogWorkRequest struct { Name string LogToSave models.RequestLogging }
type Worker ¶
type Worker struct { ID int Work chan LogWorkRequest WorkerQueue chan chan LogWorkRequest QuitChan chan bool }
func NewWorker ¶
func NewWorker(id int, workerQueue chan chan LogWorkRequest) Worker
NewWorker creates, and returns a new Worker object. Its only argument is a channel that the worker can add itself to whenever it is done its work.
Click to show internal directories.
Click to hide internal directories.