checks

package
v0.0.0-...-786e173 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Copyright 2024 Red Hat Inc

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const GITHUB_REPO = 1
View Source
const GITLAB_REPO = 2

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckResult

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

CheckResult

type GitCheck

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

defines the GitCheck type.

func NewGitCheck

func NewGitCheck(prefix string, name string, token string, url string, revision string, path string,
	log *log.Logger, metric metrics.CompositeMetric) *GitCheck

NewGitCheck returns a new instance of GitCheck.

func (*GitCheck) Check

func (c *GitCheck) Check() float64

Check runs a check and returns a float64 of the check result. The float64 is required to push values to prometheus.

func (*GitCheck) GetMetric

func (c *GitCheck) GetMetric() metrics.CompositeMetric

type GitHttpCheck

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

defines the GitHttpCheck type.

func NewGitHttpCheck

func NewGitHttpCheck(name string, repositoryType int, projectId string, token string, url string, revision string,
	path string, log *log.Logger, metric metrics.CompositeMetric) *GitHttpCheck

NewGitHttpCheck returns a new instance of GitHttpCheck.

func (*GitHttpCheck) Check

func (c *GitHttpCheck) Check() float64

Check runs a check and returns a float64 of the check result. The float64 is required to push values to prometheus.

type HttpCheck

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

defines the HttpCheck type.

func NewHttpCheck

func NewHttpCheck(name, username, password, url, cert, key string, insecure, follow bool, log *log.Logger,
	metric metrics.CompositeMetric) *HttpCheck

NewHttpCheck returns a new instance of HttpCheck.

func (*HttpCheck) Check

func (c *HttpCheck) Check() float64

Check runs a check and returns a float64 of the check result. The float64 is required to push values to prometheus.

type QuayAuth

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

func NewQuayAuth

func NewQuayAuth(username string, password string) *QuayAuth

NewQuayAuth returns a new instance of QuayAuth

type QuayCheck

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

A QuayCheck sets the necessary parameters to run a check to quay.io.

func NewQuayCheck

func NewQuayCheck(ctx context.Context, auth *QuayAuth, name, image, tmpdir string, tags []string, log *log.Logger,
	metric metrics.CompositeMetric) *QuayCheck

MewQuayCheck creates a new QuayCheck instance.

func (*QuayCheck) Check

func (c *QuayCheck) Check() float64

Check runs a QuayCheck and return the float64 status required to save the prometheus data.

Jump to

Keyboard shortcuts

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