telemetry

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2023 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package telemetry provides functionality for telemetry

Package telemetry provides functionality for telemetry

Package telemetry provides functionality for telemetry

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckVersion

func CheckVersion(t *tracker.CITracker)

CheckVersion - checks if using the latest version and saves that information in the tracker

func TelemetryRequest

func TelemetryRequest(summary *model.Summary) error

TelemetryRequest - Request to update telemetry

Types

type Client

type Client struct {
}

Client - client for making telemetry requests

func (*Client) CheckConnection

func (c *Client) CheckConnection() error

CheckConnection - checks if the endpoint is reachable

func (*Client) CheckLatestVersion

func (c *Client) CheckLatestVersion(version string) (model.Version, error)

CheckLatestVersion - Check if using KICS latest version from endpoint

func (*Client) RequestUpdateTelemetry

func (c *Client) RequestUpdateTelemetry(descriptionIDs []string) (map[string]telemetryModel.Descriptions, error)

RequestUpdateTelemetry - send telemetry request

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient - http client to use for requests

var (

	// HTTPRequestClient - http client to use for requests
	HTTPRequestClient HTTPClient = &http.Client{
		Transport: tr,
		Timeout:   20 * time.Second,
	}
)

type HTTPTelemetry

type HTTPTelemetry interface {
	CheckConnection() error
	RequestUpdateTelemetry([]string) (map[string]telemetryModel.Descriptions, error)
	CheckLatestVersion(version string) (model.Version, error)
}

HTTPTelemetry - HTTP client interface to use for requesting telemetry

Directories

Path Synopsis
Package model provides a model for the telemetry request
Package model provides a model for the telemetry request

Jump to

Keyboard shortcuts

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