server

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChildCreateRequest

type ChildCreateRequest struct {
	Id     string `url:"id",json:"id"`         // The ID of the entry.
	Port   int    `url:"port",json:"port"`     // server network port
	Server string `url:"server",json:"server"` // server dns name or IP address
	Type   string `url:"type",json:"type"`     // Plugin type.

	// The following parameters are optional
	ApiPathPrefix     *string           `url:"api-path-prefix,omitempty",json:"api-path-prefix,omitempty"` // An API path prefix inserted between '<host>:<port>/' and '/api2/'. Can be useful if the InfluxDB service runs behind a reverse proxy.
	Bucket            *string           `url:"bucket,omitempty",json:"bucket,omitempty"`                   // The InfluxDB bucket/db. Only necessary when using the http v2 api.
	Disable           *util.SpecialBool `url:"disable,omitempty",json:"disable,omitempty"`                 // Flag to disable the plugin.
	Influxdbproto     *string           `url:"influxdbproto,omitempty",json:"influxdbproto,omitempty"`
	MaxBodySize       *int              `url:"max-body-size,omitempty",json:"max-body-size,omitempty"`           // InfluxDB max-body-size in bytes. Requests are batched up to this size.
	Mtu               *int              `url:"mtu,omitempty",json:"mtu,omitempty"`                               // MTU for metrics transmission over UDP
	Organization      *string           `url:"organization,omitempty",json:"organization,omitempty"`             // The InfluxDB organization. Only necessary when using the http v2 api. Has no meaning when using v2 compatibility api.
	Path              *string           `url:"path,omitempty",json:"path,omitempty"`                             // root graphite path (ex: proxmox.mycluster.mykey)
	Proto             *string           `url:"proto,omitempty",json:"proto,omitempty"`                           // Protocol to send graphite data. TCP or UDP (default)
	Timeout           *int              `url:"timeout,omitempty",json:"timeout,omitempty"`                       // graphite TCP socket timeout (default=1)
	Token             *string           `url:"token,omitempty",json:"token,omitempty"`                           // The InfluxDB access token. Only necessary when using the http v2 api. If the v2 compatibility api is used, use 'user:password' instead.
	VerifyCertificate *util.SpecialBool `url:"verify-certificate,omitempty",json:"verify-certificate,omitempty"` // Set to 0 to disable certificate verification for https endpoints.
}

type ChildCreateResponse

type ChildCreateResponse map[string]interface{}

type Client

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

func New

func New(c HTTPClient) *Client

func (*Client) ChildCreate

func (c *Client) ChildCreate(ctx context.Context, req *ChildCreateRequest) (*ChildCreateResponse, error)

ChildCreate Create a new external metric server config

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, req *DeleteRequest) (*DeleteResponse, error)

Delete Remove Metric server.

func (*Client) Find

func (c *Client) Find(ctx context.Context, req *FindRequest) (*FindResponse, error)

Find Read metric server configuration.

func (*Client) Index

func (c *Client) Index(ctx context.Context) (*IndexResponse, error)

Index List configured metric servers.

func (*Client) Update

func (c *Client) Update(ctx context.Context, req *UpdateRequest) (*UpdateResponse, error)

Update Update metric server configuration.

type DeleteRequest

type DeleteRequest struct {
	Id string `url:"id",json:"id"`
}

type DeleteResponse

type DeleteResponse map[string]interface{}

type FindRequest

type FindRequest struct {
	Id string `url:"id",json:"id"`
}

type FindResponse

type FindResponse map[string]interface{}

type HTTPClient

type HTTPClient interface {
	Do(context.Context, string, string, interface{}, interface{}) error
}

type IndexResponse

type IndexResponse []*struct {
	Disable util.SpecialBool `url:"disable",json:"disable"` // Flag to disable the plugin.
	Id      string           `url:"id",json:"id"`           // The ID of the entry.
	Port    int              `url:"port",json:"port"`       // Server network port
	Server  string           `url:"server",json:"server"`   // Server dns name or IP address
	Type    string           `url:"type",json:"type"`       // Plugin type.

}

type UpdateRequest

type UpdateRequest struct {
	Id     string `url:"id",json:"id"`         // The ID of the entry.
	Port   int    `url:"port",json:"port"`     // server network port
	Server string `url:"server",json:"server"` // server dns name or IP address

	// The following parameters are optional
	ApiPathPrefix     *string           `url:"api-path-prefix,omitempty",json:"api-path-prefix,omitempty"` // An API path prefix inserted between '<host>:<port>/' and '/api2/'. Can be useful if the InfluxDB service runs behind a reverse proxy.
	Bucket            *string           `url:"bucket,omitempty",json:"bucket,omitempty"`                   // The InfluxDB bucket/db. Only necessary when using the http v2 api.
	Delete            *string           `url:"delete,omitempty",json:"delete,omitempty"`                   // A list of settings you want to delete.
	Digest            *string           `url:"digest,omitempty",json:"digest,omitempty"`                   // Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
	Disable           *util.SpecialBool `url:"disable,omitempty",json:"disable,omitempty"`                 // Flag to disable the plugin.
	Influxdbproto     *string           `url:"influxdbproto,omitempty",json:"influxdbproto,omitempty"`
	MaxBodySize       *int              `url:"max-body-size,omitempty",json:"max-body-size,omitempty"`           // InfluxDB max-body-size in bytes. Requests are batched up to this size.
	Mtu               *int              `url:"mtu,omitempty",json:"mtu,omitempty"`                               // MTU for metrics transmission over UDP
	Organization      *string           `url:"organization,omitempty",json:"organization,omitempty"`             // The InfluxDB organization. Only necessary when using the http v2 api. Has no meaning when using v2 compatibility api.
	Path              *string           `url:"path,omitempty",json:"path,omitempty"`                             // root graphite path (ex: proxmox.mycluster.mykey)
	Proto             *string           `url:"proto,omitempty",json:"proto,omitempty"`                           // Protocol to send graphite data. TCP or UDP (default)
	Timeout           *int              `url:"timeout,omitempty",json:"timeout,omitempty"`                       // graphite TCP socket timeout (default=1)
	Token             *string           `url:"token,omitempty",json:"token,omitempty"`                           // The InfluxDB access token. Only necessary when using the http v2 api. If the v2 compatibility api is used, use 'user:password' instead.
	VerifyCertificate *util.SpecialBool `url:"verify-certificate,omitempty",json:"verify-certificate,omitempty"` // Set to 0 to disable certificate verification for https endpoints.
}

type UpdateResponse

type UpdateResponse map[string]interface{}

Jump to

Keyboard shortcuts

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