services

package
v1.8.9 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGitHubAPIRateLimitLimit

func NewGitHubAPIRateLimitLimit() *prometheus.GaugeVec

func NewGitHubAPIRateLimitRemaining

func NewGitHubAPIRateLimitRemaining() *prometheus.GaugeVec

func NewGitHubAPIRateLimitReset

func NewGitHubAPIRateLimitReset() *prometheus.GaugeVec

func NewGitHubAPIRateLimitUsed

func NewGitHubAPIRateLimitUsed() *prometheus.GaugeVec

func NewGitHubAPIRequestDuration

func NewGitHubAPIRequestDuration() *prometheus.HistogramVec

func NewGitHubAPIRequestTotal

func NewGitHubAPIRequestTotal() *prometheus.CounterVec

Factory functions for each metric vector

func NewGitHubMetricsClient

func NewGitHubMetricsClient(metricsContext *MetricsContext) *http.Client

NewGitHubMetricsClient wraps an http.Client with metrics middleware

func NewGitHubMetricsClientFrom

func NewGitHubMetricsClientFrom(httpClient *http.Client, metricsContext *MetricsContext) *http.Client

NewGitHubMetricsClientFrom returns a new http.Client wrapping the provided one with metrics middleware

func SetupBitbucketClient

func SetupBitbucketClient(ctx context.Context, config *bitbucketv1.Configuration, scmRootCAPath string, insecure bool, caCerts []byte, proxyURL, noProxy string) *bitbucketv1.APIClient

SetupBitbucketClient configures and creates a Bitbucket API client with TLS settings

Types

type GitHubMetrics

type GitHubMetrics struct {
	RequestTotal       *prometheus.CounterVec
	RequestDuration    *prometheus.HistogramVec
	RateLimitRemaining *prometheus.GaugeVec
	RateLimitLimit     *prometheus.GaugeVec
	RateLimitReset     *prometheus.GaugeVec
	RateLimitUsed      *prometheus.GaugeVec
}

GitHubMetrics groups all metric vectors for easier injection and registration

func NewGitHubMetrics

func NewGitHubMetrics() *GitHubMetrics

Factory for a new set of GitHub metrics (for tests or custom registries)

type GitHubMetricsTransport

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

GitHubMetricsTransport is a custom http.RoundTripper that collects GitHub API metrics

func NewDefaultGitHubMetricsTransport

func NewDefaultGitHubMetricsTransport(transport http.RoundTripper, metricsContext *MetricsContext) *GitHubMetricsTransport

Default constructor

func NewGitHubMetricsTransport

func NewGitHubMetricsTransport(
	transport http.RoundTripper,
	metricsContext *MetricsContext,
	metrics *GitHubMetrics,
) *GitHubMetricsTransport

Full constructor (for tests and advanced use)

func (*GitHubMetricsTransport) RoundTrip

func (t *GitHubMetricsTransport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip implements http.RoundTripper interface and collects metrics along with debug logging

type MetricsContext

type MetricsContext struct {
	AppSetNamespace string
	AppSetName      string
}

type Repos

type Repos interface {
	// GetFiles returns content of files (not directories) within the target repo
	GetFiles(ctx context.Context, repoURL, revision, project, pattern string, noRevisionCache bool, sourceIntegrity *v1alpha1.SourceIntegrity) (map[string][]byte, error)

	// GetDirectories returns a list of directories (not files) within the target repo
	GetDirectories(ctx context.Context, repoURL, revision, project string, noRevisionCache bool, sourceIntegrity *v1alpha1.SourceIntegrity) ([]string, error)
}

func NewArgoCDService

func NewArgoCDService(db db.DB, submoduleEnabled bool, repoClientset apiclient.Clientset, newFileGlobbingEnabled bool) Repos

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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