job

package
v1.30.27 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMetricsPath              = "/metrics"
	DefaultScheme                   = "https"
	DefaultScrapeInterval           = "5m"
	DefaultScrapeTimeout            = "2m"
	DefaultSampleLimit              = 5000
	DefaultSAML2EnableURLParameters = true
)

Variables

This section is empty.

Functions

func New

func New() resource.Resource

New returns a new configured resource

Types

type BasicAuth

type BasicAuth struct {
	Username types.String `tfsdk:"username"`
	Password types.String `tfsdk:"password"`
}

BasicAuth holds basic auth data

type Job

type Job struct {
	ID              types.String `tfsdk:"id"`
	Name            types.String `tfsdk:"name"`
	ProjectID       types.String `tfsdk:"project_id"`
	ArgusInstanceID types.String `tfsdk:"argus_instance_id"`
	MetricsPath     types.String `tfsdk:"metrics_path"`
	Scheme          types.String `tfsdk:"scheme"`
	ScrapeInterval  types.String `tfsdk:"scrape_interval"`
	ScrapeTimeout   types.String `tfsdk:"scrape_timeout"`
	SampleLimit     types.Int64  `tfsdk:"sample_limit"`
	SAML2           *SAML2       `tfsdk:"saml2"`
	BasicAuth       *BasicAuth   `tfsdk:"basic_auth"`
	Targets         []Target     `tfsdk:"targets"`
}

Job is the schema model

func (*Job) FromClientJob

func (j *Job) FromClientJob(cj scrapeconfig.Job)

func (*Job) ToClientJob

func (j *Job) ToClientJob() scrapeconfig.CreateJSONBody

func (*Job) ToClientPartialUpdateJobs added in v1.27.3

func (j *Job) ToClientPartialUpdateJobs() scrapeconfig.PartialUpdateJSONBody

type Resource

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

Resource is the exported resource

func (*Resource) Configure added in v1.0.0

Configure the resource client

func (Resource) Create

Create - lifecycle function

func (Resource) Delete

Delete - lifecycle function

func (*Resource) ImportState

ImportState handles terraform import

func (*Resource) Metadata

Metadata returns data resource metadata

func (Resource) Read

Read - lifecycle function

func (*Resource) Schema added in v1.9.0

Schema returns the terraform schema structure

func (Resource) Update

Update - lifecycle function

type SAML2

type SAML2 struct {
	EnableURLParameters types.Bool `tfsdk:"enable_url_parameters"`
}

SAML2 holds saml configuration

type Target

type Target struct {
	URLs   []types.String `tfsdk:"urls"`
	Labels types.Map      `tfsdk:"labels"`
}

Target holds targets for scraping

Jump to

Keyboard shortcuts

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