external

package
v2.15.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// AddExternalBodyMetricsModeAUTO captures enum value "AUTO"
	AddExternalBodyMetricsModeAUTO string = "AUTO"

	// AddExternalBodyMetricsModePULL captures enum value "PULL"
	AddExternalBodyMetricsModePULL string = "PULL"

	// AddExternalBodyMetricsModePUSH captures enum value "PUSH"
	AddExternalBodyMetricsModePUSH string = "PUSH"
)
View Source
const (

	// AddExternalParamsBodyAddNodeNodeTypeNODETYPEINVALID captures enum value "NODE_TYPE_INVALID"
	AddExternalParamsBodyAddNodeNodeTypeNODETYPEINVALID string = "NODE_TYPE_INVALID"

	// AddExternalParamsBodyAddNodeNodeTypeGENERICNODE captures enum value "GENERIC_NODE"
	AddExternalParamsBodyAddNodeNodeTypeGENERICNODE string = "GENERIC_NODE"

	// AddExternalParamsBodyAddNodeNodeTypeCONTAINERNODE captures enum value "CONTAINER_NODE"
	AddExternalParamsBodyAddNodeNodeTypeCONTAINERNODE string = "CONTAINER_NODE"

	// AddExternalParamsBodyAddNodeNodeTypeREMOTENODE captures enum value "REMOTE_NODE"
	AddExternalParamsBodyAddNodeNodeTypeREMOTENODE string = "REMOTE_NODE"

	// AddExternalParamsBodyAddNodeNodeTypeREMOTERDSNODE captures enum value "REMOTE_RDS_NODE"
	AddExternalParamsBodyAddNodeNodeTypeREMOTERDSNODE string = "REMOTE_RDS_NODE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddExternalBody

type AddExternalBody struct {

	// Node identifier on which an external exporter is been running.
	// runs_on_node_id always should be passed with node_id.
	// Exactly one of these parameters should be present: node_id, node_name, add_node.
	RunsOnNodeID string `json:"runs_on_node_id,omitempty"`

	// Node name on which a service and node is been running.
	// Exactly one of these parameters should be present: node_id, node_name, add_node.
	NodeName string `json:"node_name,omitempty"`

	// Node and Exporter access address (DNS name or IP).
	// address always should be passed with add_node.
	Address string `json:"address,omitempty"`

	// Unique across all Services user-defined name. Required.
	ServiceName string `json:"service_name,omitempty"`

	// HTTP basic auth username for collecting metrics.
	Username string `json:"username,omitempty"`

	// HTTP basic auth password for collecting metrics.
	Password string `json:"password,omitempty"`

	// Scheme to generate URI to exporter metrics endpoints.
	Scheme string `json:"scheme,omitempty"`

	// Path under which metrics are exposed, used to generate URI.
	MetricsPath string `json:"metrics_path,omitempty"`

	// Listen port for scraping metrics.
	ListenPort int64 `json:"listen_port,omitempty"`

	// Node identifier on which an external service is been running.
	// node_id always should be passed with runs_on_node_id.
	NodeID string `json:"node_id,omitempty"`

	// Environment name.
	Environment string `json:"environment,omitempty"`

	// Cluster name.
	Cluster string `json:"cluster,omitempty"`

	// Replication set name.
	ReplicationSet string `json:"replication_set,omitempty"`

	// Custom user-assigned labels for Service.
	CustomLabels map[string]string `json:"custom_labels,omitempty"`

	// Group name of external service.
	Group string `json:"group,omitempty"`

	// MetricsMode defines desired metrics mode for agent,
	// it can be pull, push or auto mode chosen by server.
	// Enum: [AUTO PULL PUSH]
	MetricsMode *string `json:"metrics_mode,omitempty"`

	// Skip connection check.
	SkipConnectionCheck bool `json:"skip_connection_check,omitempty"`

	// add node
	AddNode *AddExternalParamsBodyAddNode `json:"add_node,omitempty"`
}

AddExternalBody add external body swagger:model AddExternalBody

func (*AddExternalBody) MarshalBinary

func (o *AddExternalBody) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AddExternalBody) UnmarshalBinary

func (o *AddExternalBody) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AddExternalBody) Validate

func (o *AddExternalBody) Validate(formats strfmt.Registry) error

Validate validates this add external body

type AddExternalDefault

type AddExternalDefault struct {
	Payload *AddExternalDefaultBody
	// contains filtered or unexported fields
}

AddExternalDefault handles this case with default header values.

An unexpected error response.

func NewAddExternalDefault

func NewAddExternalDefault(code int) *AddExternalDefault

NewAddExternalDefault creates a AddExternalDefault with default headers values

func (*AddExternalDefault) Code

func (o *AddExternalDefault) Code() int

Code gets the status code for the add external default response

func (*AddExternalDefault) Error

func (o *AddExternalDefault) Error() string

func (*AddExternalDefault) GetPayload

func (o *AddExternalDefault) GetPayload() *AddExternalDefaultBody

type AddExternalDefaultBody

type AddExternalDefaultBody struct {

	// error
	Error string `json:"error,omitempty"`

	// code
	Code int32 `json:"code,omitempty"`

	// message
	Message string `json:"message,omitempty"`

	// details
	Details []*DetailsItems0 `json:"details"`
}

AddExternalDefaultBody add external default body swagger:model AddExternalDefaultBody

func (*AddExternalDefaultBody) MarshalBinary

func (o *AddExternalDefaultBody) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AddExternalDefaultBody) UnmarshalBinary

func (o *AddExternalDefaultBody) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AddExternalDefaultBody) Validate

func (o *AddExternalDefaultBody) Validate(formats strfmt.Registry) error

Validate validates this add external default body

type AddExternalOK

type AddExternalOK struct {
	Payload *AddExternalOKBody
}

AddExternalOK handles this case with default header values.

A successful response.

func NewAddExternalOK

func NewAddExternalOK() *AddExternalOK

NewAddExternalOK creates a AddExternalOK with default headers values

func (*AddExternalOK) Error

func (o *AddExternalOK) Error() string

func (*AddExternalOK) GetPayload

func (o *AddExternalOK) GetPayload() *AddExternalOKBody

type AddExternalOKBody

type AddExternalOKBody struct {

	// external exporter
	ExternalExporter *AddExternalOKBodyExternalExporter `json:"external_exporter,omitempty"`

	// service
	Service *AddExternalOKBodyService `json:"service,omitempty"`
}

AddExternalOKBody add external OK body swagger:model AddExternalOKBody

func (*AddExternalOKBody) MarshalBinary

func (o *AddExternalOKBody) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AddExternalOKBody) UnmarshalBinary

func (o *AddExternalOKBody) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AddExternalOKBody) Validate

func (o *AddExternalOKBody) Validate(formats strfmt.Registry) error

Validate validates this add external OK body

type AddExternalOKBodyExternalExporter

type AddExternalOKBodyExternalExporter struct {

	// Unique randomly generated instance identifier.
	AgentID string `json:"agent_id,omitempty"`

	// Node identifier where this instance runs.
	RunsOnNodeID string `json:"runs_on_node_id,omitempty"`

	// If disabled, metrics from this exporter will not be collected.
	Disabled bool `json:"disabled,omitempty"`

	// Service identifier.
	ServiceID string `json:"service_id,omitempty"`

	// HTTP basic auth username for collecting metrics.
	Username string `json:"username,omitempty"`

	// Scheme to generate URI to exporter metrics endpoints.
	Scheme string `json:"scheme,omitempty"`

	// Path under which metrics are exposed, used to generate URI.
	MetricsPath string `json:"metrics_path,omitempty"`

	// Custom user-assigned labels.
	CustomLabels map[string]string `json:"custom_labels,omitempty"`

	// Listen port for scraping metrics.
	ListenPort int64 `json:"listen_port,omitempty"`

	// True if exporter uses push metrics mode.
	PushMetricsEnabled bool `json:"push_metrics_enabled,omitempty"`
}

AddExternalOKBodyExternalExporter ExternalExporter runs on any Node type, including Remote Node. swagger:model AddExternalOKBodyExternalExporter

func (*AddExternalOKBodyExternalExporter) MarshalBinary

func (o *AddExternalOKBodyExternalExporter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AddExternalOKBodyExternalExporter) UnmarshalBinary

func (o *AddExternalOKBodyExternalExporter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AddExternalOKBodyExternalExporter) Validate

Validate validates this add external OK body external exporter

type AddExternalOKBodyService

type AddExternalOKBodyService struct {

	// Unique randomly generated instance identifier.
	ServiceID string `json:"service_id,omitempty"`

	// Unique across all Services user-defined name.
	ServiceName string `json:"service_name,omitempty"`

	// Node identifier where this service instance runs.
	NodeID string `json:"node_id,omitempty"`

	// Environment name.
	Environment string `json:"environment,omitempty"`

	// Cluster name.
	Cluster string `json:"cluster,omitempty"`

	// Replication set name.
	ReplicationSet string `json:"replication_set,omitempty"`

	// Custom user-assigned labels.
	CustomLabels map[string]string `json:"custom_labels,omitempty"`

	// Group name of external service.
	Group string `json:"group,omitempty"`
}

AddExternalOKBodyService ExternalService represents a generic External service instance. swagger:model AddExternalOKBodyService

func (*AddExternalOKBodyService) MarshalBinary

func (o *AddExternalOKBodyService) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AddExternalOKBodyService) UnmarshalBinary

func (o *AddExternalOKBodyService) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AddExternalOKBodyService) Validate

func (o *AddExternalOKBodyService) Validate(formats strfmt.Registry) error

Validate validates this add external OK body service

type AddExternalParams

type AddExternalParams struct {

	/*Body*/
	Body AddExternalBody

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

AddExternalParams contains all the parameters to send to the API endpoint for the add external operation typically these are written to a http.Request

func NewAddExternalParams

func NewAddExternalParams() *AddExternalParams

NewAddExternalParams creates a new AddExternalParams object with the default values initialized.

func NewAddExternalParamsWithContext

func NewAddExternalParamsWithContext(ctx context.Context) *AddExternalParams

NewAddExternalParamsWithContext creates a new AddExternalParams object with the default values initialized, and the ability to set a context for a request

func NewAddExternalParamsWithHTTPClient

func NewAddExternalParamsWithHTTPClient(client *http.Client) *AddExternalParams

NewAddExternalParamsWithHTTPClient creates a new AddExternalParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewAddExternalParamsWithTimeout

func NewAddExternalParamsWithTimeout(timeout time.Duration) *AddExternalParams

NewAddExternalParamsWithTimeout creates a new AddExternalParams object with the default values initialized, and the ability to set a timeout on a request

func (*AddExternalParams) SetBody

func (o *AddExternalParams) SetBody(body AddExternalBody)

SetBody adds the body to the add external params

func (*AddExternalParams) SetContext

func (o *AddExternalParams) SetContext(ctx context.Context)

SetContext adds the context to the add external params

func (*AddExternalParams) SetHTTPClient

func (o *AddExternalParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the add external params

func (*AddExternalParams) SetTimeout

func (o *AddExternalParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the add external params

func (*AddExternalParams) WithBody

WithBody adds the body to the add external params

func (*AddExternalParams) WithContext

func (o *AddExternalParams) WithContext(ctx context.Context) *AddExternalParams

WithContext adds the context to the add external params

func (*AddExternalParams) WithHTTPClient

func (o *AddExternalParams) WithHTTPClient(client *http.Client) *AddExternalParams

WithHTTPClient adds the HTTPClient to the add external params

func (*AddExternalParams) WithTimeout

func (o *AddExternalParams) WithTimeout(timeout time.Duration) *AddExternalParams

WithTimeout adds the timeout to the add external params

func (*AddExternalParams) WriteToRequest

func (o *AddExternalParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type AddExternalParamsBodyAddNode

type AddExternalParamsBodyAddNode struct {

	// NodeType describes supported Node types.
	// Enum: [NODE_TYPE_INVALID GENERIC_NODE CONTAINER_NODE REMOTE_NODE REMOTE_RDS_NODE]
	NodeType *string `json:"node_type,omitempty"`

	// Unique across all Nodes user-defined name.
	NodeName string `json:"node_name,omitempty"`

	// Linux machine-id.
	MachineID string `json:"machine_id,omitempty"`

	// Linux distribution name and version.
	Distro string `json:"distro,omitempty"`

	// Container identifier. If specified, must be a unique Docker container identifier.
	ContainerID string `json:"container_id,omitempty"`

	// Container name.
	ContainerName string `json:"container_name,omitempty"`

	// Node model.
	NodeModel string `json:"node_model,omitempty"`

	// Node region.
	Region string `json:"region,omitempty"`

	// Node availability zone.
	Az string `json:"az,omitempty"`

	// Custom user-assigned labels for Node.
	CustomLabels map[string]string `json:"custom_labels,omitempty"`
}

AddExternalParamsBodyAddNode AddNodeParams is a params to add new node to inventory while adding new service. swagger:model AddExternalParamsBodyAddNode

func (*AddExternalParamsBodyAddNode) MarshalBinary

func (o *AddExternalParamsBodyAddNode) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AddExternalParamsBodyAddNode) UnmarshalBinary

func (o *AddExternalParamsBodyAddNode) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AddExternalParamsBodyAddNode) Validate

func (o *AddExternalParamsBodyAddNode) Validate(formats strfmt.Registry) error

Validate validates this add external params body add node

type AddExternalReader

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

AddExternalReader is a Reader for the AddExternal structure.

func (*AddExternalReader) ReadResponse

func (o *AddExternalReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type Client

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

Client for external API

func (*Client) AddExternal

func (a *Client) AddExternal(params *AddExternalParams) (*AddExternalOK, error)

AddExternal adds external adds external service and adds external exporter it automatically adds a service to inventory which is running on provided node id then adds an external exporter agent to inventory which is running on provided runs on node id

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

type ClientService

type ClientService interface {
	AddExternal(params *AddExternalParams) (*AddExternalOK, error)

	SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService

New creates a new external API client.

type DetailsItems0

type DetailsItems0 struct {

	// type url
	TypeURL string `json:"type_url,omitempty"`

	// value
	// Format: byte
	Value strfmt.Base64 `json:"value,omitempty"`
}

DetailsItems0 details items0 swagger:model DetailsItems0

func (*DetailsItems0) MarshalBinary

func (o *DetailsItems0) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DetailsItems0) UnmarshalBinary

func (o *DetailsItems0) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DetailsItems0) Validate

func (o *DetailsItems0) Validate(formats strfmt.Registry) error

Validate validates this details items0

Jump to

Keyboard shortcuts

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