audit

package
v0.0.35 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auditor

type Auditor interface {
	Store(ctx context.Context, entry Entry)
}

type AuditorImpl

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

func NewAuditor

func NewAuditor(waitGroup *sync.WaitGroup) (*AuditorImpl, error)

NewAuditor returns a new auditor with a elastic search. If the audit is disabled by config, it returns a noop AuditorImpl

func (*AuditorImpl) StartSender

func (a *AuditorImpl) StartSender(ctx context.Context)

StartSender sends the audit logs from executed operations to Elastic Search.

func (*AuditorImpl) Store

func (a *AuditorImpl) Store(ctx context.Context, entry Entry)

type Entry

type Entry struct {
	ID                string    `json:"id"`
	Queue             string    `json:"queue"`
	QueuePrefix       string    `json:"queue_prefix"`
	QueueSuffix       string    `json:"queue_suffix"`
	LastScoreSubtract float64   `json:"last_score_subtract"` // deprecated
	Timestamp         time.Time `json:"timestamp"`
	Breakpoint        string    `json:"breakpoint"`
	Signal            Signal    `json:"signal"`
	Reason            string    `json:"reason"`
	LockMs            int64     `json:"lock_ms"`
}

type Signal

type Signal string
const (
	ACK             Signal = "ACK"
	NACK            Signal = "NACK"
	TIMEOUT         Signal = "TIMEOUT"
	REMOVE          Signal = "REMOVE"
	UNLOCK          Signal = "UNLOCK"
	INSERT_CACHE    Signal = "INSERT_CACHE"
	MISSING_STORAGE Signal = "MISSING_STORAGE"
)

Jump to

Keyboard shortcuts

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