telemetry

package
v1.7.0-integrations 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

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