reporting

package
v1.15.8 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SystemMetadataReportingProcessID = "reporting-process-id"
	ReportingInterval                = 1 * time.Hour
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EntDeps

type EntDeps struct{}

type ReportingManager

type ReportingManager struct {
	EntDeps
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewReportingManager

func NewReportingManager(logger hclog.Logger, deps EntDeps, server ServerDelegate, stateProvider StateDelegate) *ReportingManager

func (*ReportingManager) Run

func (m *ReportingManager) Run(ctx context.Context)

func (*ReportingManager) StartReportingAgent

func (rm *ReportingManager) StartReportingAgent() error

func (*ReportingManager) StopReportingAgent

func (rm *ReportingManager) StopReportingAgent() error

type ServerDelegate

type ServerDelegate interface {
	GetSystemMetadata(key string) (string, error)
	SetSystemMetadataKey(key, val string) error
	IsLeader() bool
}

type StateDelegate

type StateDelegate interface {
	NodeUsage() (uint64, state.NodeUsage, error)
	ServiceUsage(ws memdb.WatchSet) (uint64, structs.ServiceUsage, error)
}

Jump to

Keyboard shortcuts

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