ha_proxy

package
v2.18.0+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (

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

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

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

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

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

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

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

	// AddHAProxyParamsBodyAddNodeNodeTypeREMOTERDSNODE captures enum value "REMOTE_RDS_NODE"
	AddHAProxyParamsBodyAddNodeNodeTypeREMOTERDSNODE string = "REMOTE_RDS_NODE"

	// AddHAProxyParamsBodyAddNodeNodeTypeREMOTEAZUREDATABASENODE captures enum value "REMOTE_AZURE_DATABASE_NODE"
	AddHAProxyParamsBodyAddNodeNodeTypeREMOTEAZUREDATABASENODE string = "REMOTE_AZURE_DATABASE_NODE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddHAProxyBody

type AddHAProxyBody struct {

	// Node identifier on which an external exporter is been running.
	// Exactly one of these parameters should be present: node_id, node_name, add_node.
	NodeID string `json:"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"`

	// 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"`

	// 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 *AddHAProxyParamsBodyAddNode `json:"add_node,omitempty"`
}

AddHAProxyBody add HA proxy body swagger:model AddHAProxyBody

func (*AddHAProxyBody) MarshalBinary

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

MarshalBinary interface implementation

func (*AddHAProxyBody) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*AddHAProxyBody) Validate

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

Validate validates this add HA proxy body

type AddHAProxyDefault

type AddHAProxyDefault struct {
	Payload *AddHAProxyDefaultBody
	// contains filtered or unexported fields
}

AddHAProxyDefault handles this case with default header values.

An unexpected error response.

func NewAddHAProxyDefault

func NewAddHAProxyDefault(code int) *AddHAProxyDefault

NewAddHAProxyDefault creates a AddHAProxyDefault with default headers values

func (*AddHAProxyDefault) Code

func (o *AddHAProxyDefault) Code() int

Code gets the status code for the add HA proxy default response

func (*AddHAProxyDefault) Error

func (o *AddHAProxyDefault) Error() string

func (*AddHAProxyDefault) GetPayload

func (o *AddHAProxyDefault) GetPayload() *AddHAProxyDefaultBody

type AddHAProxyDefaultBody

type AddHAProxyDefaultBody struct {

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

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

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

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

AddHAProxyDefaultBody add HA proxy default body swagger:model AddHAProxyDefaultBody

func (*AddHAProxyDefaultBody) MarshalBinary

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

MarshalBinary interface implementation

func (*AddHAProxyDefaultBody) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*AddHAProxyDefaultBody) Validate

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

Validate validates this add HA proxy default body

type AddHAProxyOK

type AddHAProxyOK struct {
	Payload *AddHAProxyOKBody
}

AddHAProxyOK handles this case with default header values.

A successful response.

func NewAddHAProxyOK

func NewAddHAProxyOK() *AddHAProxyOK

NewAddHAProxyOK creates a AddHAProxyOK with default headers values

func (*AddHAProxyOK) Error

func (o *AddHAProxyOK) Error() string

func (*AddHAProxyOK) GetPayload

func (o *AddHAProxyOK) GetPayload() *AddHAProxyOKBody

type AddHAProxyOKBody

type AddHAProxyOKBody struct {

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

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

AddHAProxyOKBody add HA proxy OK body swagger:model AddHAProxyOKBody

func (*AddHAProxyOKBody) MarshalBinary

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

MarshalBinary interface implementation

func (*AddHAProxyOKBody) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*AddHAProxyOKBody) Validate

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

Validate validates this add HA proxy OK body

type AddHAProxyOKBodyExternalExporter

type AddHAProxyOKBodyExternalExporter 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"`
}

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

func (*AddHAProxyOKBodyExternalExporter) MarshalBinary

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

MarshalBinary interface implementation

func (*AddHAProxyOKBodyExternalExporter) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*AddHAProxyOKBodyExternalExporter) Validate

Validate validates this add HA proxy OK body external exporter

type AddHAProxyOKBodyService

type AddHAProxyOKBodyService 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"`
}

AddHAProxyOKBodyService HAProxyService represents a generic HAProxy service instance. swagger:model AddHAProxyOKBodyService

func (*AddHAProxyOKBodyService) MarshalBinary

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

MarshalBinary interface implementation

func (*AddHAProxyOKBodyService) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*AddHAProxyOKBodyService) Validate

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

Validate validates this add HA proxy OK body service

type AddHAProxyParams

type AddHAProxyParams struct {

	/*Body*/
	Body AddHAProxyBody

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

AddHAProxyParams contains all the parameters to send to the API endpoint for the add HA proxy operation typically these are written to a http.Request

func NewAddHAProxyParams

func NewAddHAProxyParams() *AddHAProxyParams

NewAddHAProxyParams creates a new AddHAProxyParams object with the default values initialized.

func NewAddHAProxyParamsWithContext

func NewAddHAProxyParamsWithContext(ctx context.Context) *AddHAProxyParams

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

func NewAddHAProxyParamsWithHTTPClient

func NewAddHAProxyParamsWithHTTPClient(client *http.Client) *AddHAProxyParams

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

func NewAddHAProxyParamsWithTimeout

func NewAddHAProxyParamsWithTimeout(timeout time.Duration) *AddHAProxyParams

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

func (*AddHAProxyParams) SetBody

func (o *AddHAProxyParams) SetBody(body AddHAProxyBody)

SetBody adds the body to the add HA proxy params

func (*AddHAProxyParams) SetContext

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

SetContext adds the context to the add HA proxy params

func (*AddHAProxyParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the add HA proxy params

func (*AddHAProxyParams) SetTimeout

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

SetTimeout adds the timeout to the add HA proxy params

func (*AddHAProxyParams) WithBody

WithBody adds the body to the add HA proxy params

func (*AddHAProxyParams) WithContext

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

WithContext adds the context to the add HA proxy params

func (*AddHAProxyParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the add HA proxy params

func (*AddHAProxyParams) WithTimeout

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

WithTimeout adds the timeout to the add HA proxy params

func (*AddHAProxyParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type AddHAProxyParamsBodyAddNode

type AddHAProxyParamsBodyAddNode struct {

	// NodeType describes supported Node types.
	// Enum: [NODE_TYPE_INVALID GENERIC_NODE CONTAINER_NODE REMOTE_NODE REMOTE_RDS_NODE REMOTE_AZURE_DATABASE_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"`
}

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

func (*AddHAProxyParamsBodyAddNode) MarshalBinary

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

MarshalBinary interface implementation

func (*AddHAProxyParamsBodyAddNode) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*AddHAProxyParamsBodyAddNode) Validate

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

Validate validates this add HA proxy params body add node

type AddHAProxyReader

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

AddHAProxyReader is a Reader for the AddHAProxy structure.

func (*AddHAProxyReader) ReadResponse

func (o *AddHAProxyReader) 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 ha proxy API

func (*Client) AddHAProxy

func (a *Client) AddHAProxy(params *AddHAProxyParams) (*AddHAProxyOK, error)

AddHAProxy adds HA proxy adds HA proxy 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

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientService

type ClientService interface {
	AddHAProxy(params *AddHAProxyParams) (*AddHAProxyOK, 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 ha proxy API client.

type DetailsItems0

type DetailsItems0 struct {

	// A URL/resource name that uniquely identifies the type of the serialized
	// protocol buffer message. This string must contain at least
	// one "/" character. The last segment of the URL's path must represent
	// the fully qualified name of the type (as in
	// `path/google.protobuf.Duration`). The name should be in a canonical form
	// (e.g., leading "." is not accepted).
	//
	// In practice, teams usually precompile into the binary all types that they
	// expect it to use in the context of Any. However, for URLs which use the
	// scheme `http`, `https`, or no scheme, one can optionally set up a type
	// server that maps type URLs to message definitions as follows:
	//
	// * If no scheme is provided, `https` is assumed.
	// * An HTTP GET on the URL must yield a [google.protobuf.Type][]
	//   value in binary format, or produce an error.
	// * Applications are allowed to cache lookup results based on the
	//   URL, or have them precompiled into a binary to avoid any
	//   lookup. Therefore, binary compatibility needs to be preserved
	//   on changes to types. (Use versioned type names to manage
	//   breaking changes.)
	//
	// Note: this functionality is not currently available in the official
	// protobuf release, and it is not used for type URLs beginning with
	// type.googleapis.com.
	//
	// Schemes other than `http`, `https` (or the empty scheme) might be
	// used with implementation specific semantics.
	TypeURL string `json:"type_url,omitempty"`

	// Must be a valid serialized protocol buffer of the above specified type.
	// Format: byte
	Value strfmt.Base64 `json:"value,omitempty"`
}

DetailsItems0 `Any` contains an arbitrary serialized protocol buffer message along with a // URL that describes the type of the serialized message. // // Protobuf library provides support to pack/unpack Any values in the form // of utility functions or additional generated methods of the Any type. // // Example 1: Pack and unpack a message in C++. // // Foo foo = ...; // Any any; // any.PackFrom(foo); // ... // if (any.UnpackTo(&foo)) { // ... // } // // Example 2: Pack and unpack a message in Java. // // Foo foo = ...; // Any any = Any.pack(foo); // ... // if (any.is(Foo.class)) { // foo = any.unpack(Foo.class); // } // // Example 3: Pack and unpack a message in Python. // // foo = Foo(...) // any = Any() // any.Pack(foo) // ... // if any.Is(Foo.DESCRIPTOR): // any.Unpack(foo) // ... // // Example 4: Pack and unpack a message in Go // // foo := &pb.Foo{...} // any, err := ptypes.MarshalAny(foo) // ... // foo := &pb.Foo{} // if err := ptypes.UnmarshalAny(any, foo); err != nil { // ... // } // // The pack methods provided by protobuf library will by default use // 'type.googleapis.com/full.type.name' as the type URL and the unpack // methods only use the fully qualified type name after the last '/' // in the type URL, for example "foo.bar.com/x/y.z" will yield type // name "y.z". // // // JSON // ==== // The JSON representation of an `Any` value uses the regular // representation of the deserialized, embedded message, with an // additional field `@type` which contains the type URL. Example: // // package google.profile; // message Person { // string first_name = 1; // string last_name = 2; // } // // { // "@type": "type.googleapis.com/google.profile.Person", // "firstName": <string>, // "lastName": <string> // } // // If the embedded message type is well-known and has a custom JSON // representation, that representation will be embedded adding a field // `value` which holds the custom JSON in addition to the `@type` // field. Example (for message [google.protobuf.Duration][]): // // { // "@type": "type.googleapis.com/google.protobuf.Duration", // "value": "1.212s" // } 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