wal

package
v0.0.0-...-8aeb8a1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Record

type Record struct {
	Events         []events.Event         `json:"events,omitempty"`
	Token          string                 `json:"token,omitempty"`
	ProcessorType  string                 `json:"processor_type,omitempty"`
	RequestContext *events.RequestContext `json:"request_context,omitempty"`
}

Record is a dto for saving serialized input events with token and processor type

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is a write-ahead-log service that collects events when the application is in idle mode (see appstatus.AppStatus) and stores them into log file when the application isn't in idle mode - process log file and store events

func NewService

func NewService(logEventPath string, logger logging.ObjectLogger, multiplexingService *multiplexing.Service, processorHolder *events.ProcessorHolder) *Service

NewService returns configured Service and starts goroutine for handling write-ahead-log

func (*Service) Close

func (s *Service) Close() error

Close closes goroutine and logger

func (*Service) Consume

func (s *Service) Consume(events []events.Event, reqContext *events.RequestContext, token, processorType string)

Consume passes record into logger

Jump to

Keyboard shortcuts

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