result

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateReport

func GenerateReport(writer io.Writer, stat *Stat, ctx context.Context) error

func OpenResult

func OpenResult() error

Types

type Brief

type Brief map[etype.EntryError]int64

func (*Brief) AddCountFor

func (s *Brief) AddCountFor(typ etype.EntryError)

func (*Brief) Detail

func (s *Brief) Detail() string

func (*Brief) Total

func (s *Brief) Total() int64

type ClientStat

type ClientStat struct {
	LegalCount      int              `json:"l"`
	IllegalCount    int              `json:"i"`
	MaxIllegalLevel etype.EntryError `json:"m"`
}

func (*ClientStat) AddStat

func (c *ClientStat) AddStat(ee etype.EntryError)

type GenerationData added in v0.9.0

type GenerationData struct {
	AnalysisResult *Stat
	Labels         map[etype.EntryError]string
}

type Stat

type Stat struct {
	Brief       Brief
	ClientCount int
	Clients     map[string]*ClientStat
	Detail      []*entry.LogEntry
	Ctx         context.Context
}

func NewStat

func NewStat(ctx context.Context) *Stat

用于统计的Handler,实现了Handler接口

func (*Stat) RecordEntry added in v0.9.0

func (stat *Stat) RecordEntry(rec *entry.LogEntry) error

func (*Stat) RecordError added in v0.9.0

func (stat *Stat) RecordError(err error) error

func (*Stat) Sum added in v0.9.0

func (stat *Stat) Sum()

Jump to

Keyboard shortcuts

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