node

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 (

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

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

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

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

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

	// RegisterNodeBodyNodeTypeREMOTEAZUREDATABASENODE captures enum value "REMOTE_AZURE_DATABASE_NODE"
	RegisterNodeBodyNodeTypeREMOTEAZUREDATABASENODE string = "REMOTE_AZURE_DATABASE_NODE"
)
View Source
const (

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

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

	// RegisterNodeBodyMetricsModePUSH captures enum value "PUSH"
	RegisterNodeBodyMetricsModePUSH string = "PUSH"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client for node API

func (*Client) RegisterNode

func (a *Client) RegisterNode(params *RegisterNodeParams) (*RegisterNodeOK, error)

RegisterNode registers node registers a new node and pmm agent

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientService

type ClientService interface {
	RegisterNode(params *RegisterNodeParams) (*RegisterNodeOK, 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 node 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

type RegisterNodeBody

type RegisterNodeBody 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"`

	// Node address (DNS name or IP).
	Address string `json:"address,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"`

	// If true, and Node with that name already exist, it will be removed with all dependent Services and Agents.
	Reregister bool `json:"reregister,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"`

	// List of collector names to disable in this exporter.
	DisableCollectors []string `json:"disable_collectors"`
}

RegisterNodeBody register node body swagger:model RegisterNodeBody

func (*RegisterNodeBody) MarshalBinary

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

MarshalBinary interface implementation

func (*RegisterNodeBody) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*RegisterNodeBody) Validate

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

Validate validates this register node body

type RegisterNodeDefault

type RegisterNodeDefault struct {
	Payload *RegisterNodeDefaultBody
	// contains filtered or unexported fields
}

RegisterNodeDefault handles this case with default header values.

An unexpected error response.

func NewRegisterNodeDefault

func NewRegisterNodeDefault(code int) *RegisterNodeDefault

NewRegisterNodeDefault creates a RegisterNodeDefault with default headers values

func (*RegisterNodeDefault) Code

func (o *RegisterNodeDefault) Code() int

Code gets the status code for the register node default response

func (*RegisterNodeDefault) Error

func (o *RegisterNodeDefault) Error() string

func (*RegisterNodeDefault) GetPayload

type RegisterNodeDefaultBody

type RegisterNodeDefaultBody struct {

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

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

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

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

RegisterNodeDefaultBody register node default body swagger:model RegisterNodeDefaultBody

func (*RegisterNodeDefaultBody) MarshalBinary

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

MarshalBinary interface implementation

func (*RegisterNodeDefaultBody) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*RegisterNodeDefaultBody) Validate

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

Validate validates this register node default body

type RegisterNodeOK

type RegisterNodeOK struct {
	Payload *RegisterNodeOKBody
}

RegisterNodeOK handles this case with default header values.

A successful response.

func NewRegisterNodeOK

func NewRegisterNodeOK() *RegisterNodeOK

NewRegisterNodeOK creates a RegisterNodeOK with default headers values

func (*RegisterNodeOK) Error

func (o *RegisterNodeOK) Error() string

func (*RegisterNodeOK) GetPayload

func (o *RegisterNodeOK) GetPayload() *RegisterNodeOKBody

type RegisterNodeOKBody

type RegisterNodeOKBody struct {

	// container node
	ContainerNode *RegisterNodeOKBodyContainerNode `json:"container_node,omitempty"`

	// generic node
	GenericNode *RegisterNodeOKBodyGenericNode `json:"generic_node,omitempty"`

	// pmm agent
	PMMAgent *RegisterNodeOKBodyPMMAgent `json:"pmm_agent,omitempty"`
}

RegisterNodeOKBody register node OK body swagger:model RegisterNodeOKBody

func (*RegisterNodeOKBody) MarshalBinary

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

MarshalBinary interface implementation

func (*RegisterNodeOKBody) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*RegisterNodeOKBody) Validate

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

Validate validates this register node OK body

type RegisterNodeOKBodyContainerNode

type RegisterNodeOKBodyContainerNode struct {

	// Unique randomly generated instance identifier.
	NodeID string `json:"node_id,omitempty"`

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

	// Node address (DNS name or IP).
	Address string `json:"address,omitempty"`

	// Linux machine-id of the Generic Node where this Container Node runs.
	MachineID string `json:"machine_id,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.
	CustomLabels map[string]string `json:"custom_labels,omitempty"`
}

RegisterNodeOKBodyContainerNode ContainerNode represents a Docker container. swagger:model RegisterNodeOKBodyContainerNode

func (*RegisterNodeOKBodyContainerNode) MarshalBinary

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

MarshalBinary interface implementation

func (*RegisterNodeOKBodyContainerNode) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*RegisterNodeOKBodyContainerNode) Validate

Validate validates this register node OK body container node

type RegisterNodeOKBodyGenericNode

type RegisterNodeOKBodyGenericNode struct {

	// Unique randomly generated instance identifier.
	NodeID string `json:"node_id,omitempty"`

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

	// Node address (DNS name or IP).
	Address string `json:"address,omitempty"`

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

	// Linux distribution name and version.
	Distro string `json:"distro,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.
	CustomLabels map[string]string `json:"custom_labels,omitempty"`
}

RegisterNodeOKBodyGenericNode GenericNode represents a bare metal server or virtual machine. swagger:model RegisterNodeOKBodyGenericNode

func (*RegisterNodeOKBodyGenericNode) MarshalBinary

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

MarshalBinary interface implementation

func (*RegisterNodeOKBodyGenericNode) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*RegisterNodeOKBodyGenericNode) Validate

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

Validate validates this register node OK body generic node

type RegisterNodeOKBodyPMMAgent

type RegisterNodeOKBodyPMMAgent 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"`

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

	// True if Agent is running and connected to pmm-managed.
	Connected bool `json:"connected,omitempty"`
}

RegisterNodeOKBodyPMMAgent PMMAgent runs on Generic or Container Node. swagger:model RegisterNodeOKBodyPMMAgent

func (*RegisterNodeOKBodyPMMAgent) MarshalBinary

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

MarshalBinary interface implementation

func (*RegisterNodeOKBodyPMMAgent) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*RegisterNodeOKBodyPMMAgent) Validate

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

Validate validates this register node OK body PMM agent

type RegisterNodeParams

type RegisterNodeParams struct {

	/*Body*/
	Body RegisterNodeBody

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

RegisterNodeParams contains all the parameters to send to the API endpoint for the register node operation typically these are written to a http.Request

func NewRegisterNodeParams

func NewRegisterNodeParams() *RegisterNodeParams

NewRegisterNodeParams creates a new RegisterNodeParams object with the default values initialized.

func NewRegisterNodeParamsWithContext

func NewRegisterNodeParamsWithContext(ctx context.Context) *RegisterNodeParams

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

func NewRegisterNodeParamsWithHTTPClient

func NewRegisterNodeParamsWithHTTPClient(client *http.Client) *RegisterNodeParams

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

func NewRegisterNodeParamsWithTimeout

func NewRegisterNodeParamsWithTimeout(timeout time.Duration) *RegisterNodeParams

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

func (*RegisterNodeParams) SetBody

func (o *RegisterNodeParams) SetBody(body RegisterNodeBody)

SetBody adds the body to the register node params

func (*RegisterNodeParams) SetContext

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

SetContext adds the context to the register node params

func (*RegisterNodeParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the register node params

func (*RegisterNodeParams) SetTimeout

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

SetTimeout adds the timeout to the register node params

func (*RegisterNodeParams) WithBody

WithBody adds the body to the register node params

func (*RegisterNodeParams) WithContext

WithContext adds the context to the register node params

func (*RegisterNodeParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the register node params

func (*RegisterNodeParams) WithTimeout

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

WithTimeout adds the timeout to the register node params

func (*RegisterNodeParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type RegisterNodeReader

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

RegisterNodeReader is a Reader for the RegisterNode structure.

func (*RegisterNodeReader) ReadResponse

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

ReadResponse reads a server response into the received o.

Jump to

Keyboard shortcuts

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