ur

package
v0.0.0-...-b5ba5ed Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MPL-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const Version = 3

Current version number of the usage report, for acceptance purposes. If fields are added or changed this integer must be incremented so that users are prompted for acceptance of the new report.

Variables

View Source
var StartTime = time.Now().Truncate(time.Second)

Functions

func CpuBench

func CpuBench(ctx context.Context, iterations int, duration time.Duration, useWeakHash bool) float64

CpuBench returns CPU performance as a measure of single threaded SHA-256 MiB/s

Types

type FailureData

type FailureData struct {
	Description string
	Goroutines  string
	Extra       map[string]string
}

func FailureDataWithGoroutines

func FailureDataWithGoroutines(description string) FailureData

type FailureHandler

type FailureHandler interface {
	suture.Service
	config.Committer
}

func NewFailureHandler

func NewFailureHandler(cfg config.Wrapper, evLogger events.Logger) FailureHandler

type FailureReport

type FailureReport struct {
	FailureData
	Count   int
	Version string
}

type Model

type Model interface {
	DBSnapshot(folder string) (*db.Snapshot, error)
	UsageReportingStats(report *contract.Report, version int, preview bool)
}

type Service

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

func New

func New(cfg config.Wrapper, m Model, connectionsService connections.Service, noUpgrade bool) *Service

func (*Service) CommitConfiguration

func (s *Service) CommitConfiguration(from, to config.Configuration) bool

func (*Service) ReportData

func (s *Service) ReportData(ctx context.Context) (*contract.Report, error)

ReportData returns the data to be sent in a usage report with the currently configured usage reporting version.

func (*Service) ReportDataPreview

func (s *Service) ReportDataPreview(ctx context.Context, urVersion int) (*contract.Report, error)

ReportDataPreview returns a preview of the data to be sent in a usage report with the given version.

func (*Service) Serve

func (s *Service) Serve(ctx context.Context) error

func (*Service) String

func (*Service) String() string

func (*Service) UptimeS

func (*Service) UptimeS() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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