Documentation ¶
Index ¶
- Constants
- type AddExternalBody
- type AddExternalDefault
- type AddExternalDefaultBody
- type AddExternalOK
- type AddExternalOKBody
- type AddExternalOKBodyExternalExporter
- type AddExternalOKBodyService
- type AddExternalParams
- func (o *AddExternalParams) SetBody(body AddExternalBody)
- func (o *AddExternalParams) SetContext(ctx context.Context)
- func (o *AddExternalParams) SetHTTPClient(client *http.Client)
- func (o *AddExternalParams) SetTimeout(timeout time.Duration)
- func (o *AddExternalParams) WithBody(body AddExternalBody) *AddExternalParams
- func (o *AddExternalParams) WithContext(ctx context.Context) *AddExternalParams
- func (o *AddExternalParams) WithHTTPClient(client *http.Client) *AddExternalParams
- func (o *AddExternalParams) WithTimeout(timeout time.Duration) *AddExternalParams
- func (o *AddExternalParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type AddExternalParamsBodyAddNode
- type AddExternalReader
- type Client
- type ClientService
- type DetailsItems0
Constants ¶
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" )
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" // AddExternalParamsBodyAddNodeNodeTypeREMOTEAZUREDATABASENODE captures enum value "REMOTE_AZURE_DATABASE_NODE" AddExternalParamsBodyAddNodeNodeTypeREMOTEAZUREDATABASENODE string = "REMOTE_AZURE_DATABASE_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
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
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
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
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
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 ¶
func (o *AddExternalParams) WithBody(body AddExternalBody) *AddExternalParams
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 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"` }
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
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 { // 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