fleet

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllEnrollmentTokens

func AllEnrollmentTokens(ctx context.Context, client *Client) ([]fleetapi.EnrollmentApiKey, diag.Diagnostics)

AllEnrollmentTokens reads all enrollment tokens from the API.

func CreateAgentPolicy

CreateAgentPolicy creates a new agent policy.

func CreateFleetServerHost

CreateFleetServerHost creates a new fleet server host.

func CreateOutput

CreateOutput creates a new output.

func DeleteAgentPolicy

func DeleteAgentPolicy(ctx context.Context, client *Client, id string) diag.Diagnostics

DeleteAgentPolicy deletes an existing agent policy

func DeleteFleetServerHost

func DeleteFleetServerHost(ctx context.Context, client *Client, id string) diag.Diagnostics

DeleteFleetServerHost deletes an existing fleet server host.

func DeleteOutput

func DeleteOutput(ctx context.Context, client *Client, id string) diag.Diagnostics

DeleteOutput deletes an existing output

func ReadAgentPolicy

func ReadAgentPolicy(ctx context.Context, client *Client, id string) (*fleetapi.AgentPolicy, diag.Diagnostics)

ReadAgentPolicy reads a specific agent policy from the API.

func ReadFleetServerHost

func ReadFleetServerHost(ctx context.Context, client *Client, id string) (*fleetapi.FleetServerHost, diag.Diagnostics)

ReadFleetServerHost reads a specific fleet server host from the API.

func ReadOutput

func ReadOutput(ctx context.Context, client *Client, id string) (*fleetapi.OutputCreateRequest, diag.Diagnostics)

ReadOutput reads a specific output from the API.

func UpdateAgentPolicy

UpdateAgentPolicy updates an existing agent policy.

func UpdateFleetServerHost

UpdateFleetServerHost updates an existing fleet server host.

func UpdateOutput

UpdateOutput updates an existing output.

Types

type Client

type Client struct {
	URL  string
	HTTP *http.Client
	API  *fleetapi.ClientWithResponses
}

Client provides an API client for Elastic Fleet.

func NewClient

func NewClient(cfg Config) (*Client, error)

NewClient creates a new Elastic Fleet API client.

type Config

type Config struct {
	URL      string
	Username string
	Password string
	APIKey   string
	Insecure bool
	CACerts  []string
}

Config is the configuration for the fleet client.

Jump to

Keyboard shortcuts

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