insightsuploader

package
v0.0.0-...-898015a Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorizer

type Authorizer interface {
	IsAuthorizationError(error) bool
}

type Controller

type Controller struct {
	controllerstatus.StatusController
	// contains filtered or unexported fields
}

func New

func New(summarizer Summarizer,
	client *insightsclient.Client,
	configurator configobserver.Interface,
	apiConfigurator configobserver.InsightsDataGatherObserver,
	statusReporter StatusReporter,
	initialDelay time.Duration) *Controller

func (*Controller) ArchiveUploaded

func (c *Controller) ArchiveUploaded() <-chan struct{}

ArchiveUploaded returns a channel that indicates when an archive is uploaded

func (*Controller) Run

func (c *Controller) Run(ctx context.Context, initialDelay time.Duration)

func (*Controller) Upload

func (c *Controller) Upload(ctx context.Context, s *insightsclient.Source) (string, int, error)

Upload is an alternative simple upload method used only in TechPreview clusters. Returns Insights request ID and error=nil in case of successful data upload.

type StatusReporter

type StatusReporter interface {
	LastReportedTime() time.Time
	SetLastReportedTime(time.Time)
}

type Summarizer

type Summarizer interface {
	Summary(ctx context.Context, since time.Time) (*insightsclient.Source, bool, error)
}

Jump to

Keyboard shortcuts

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