client

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Overview

Package client provides a client over the REST HTTP API of Calyptia Cloud.

Package client provides a client over the REST HTTP API of Calyptia Cloud.

Package client provides a client over the REST HTTP API of Calyptia Cloud.

Package client provides a client over the REST HTTP API of Calyptia Cloud.

Package client provides a client over the REST HTTP API of Calyptia Cloud.

Package client provides a client over the REST HTTP API of Calyptia Cloud.

Package client provides a client over the REST HTTP API of Calyptia Cloud.

Package client provides a client over the REST HTTP API of Calyptia Cloud.

Package client provides a client over the REST HTTP API of Calyptia Cloud.

Index

Constants

View Source
const (
	// DefaultBaseURL of the API.
	DefaultBaseURL = "https://cloud-api.calyptia.com"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	BaseURL string
	// Tip: Use oauth2.NewClient(context.Context, *oauth2.TokenSource)
	Client *http.Client
	// contains filtered or unexported fields
}

Client is the client over the REST HTTP API of Calyptia Cloud.

func New

func New() *Client

New default client.

func (*Client) AWSCustomerRedirect added in v1.2.0

func (c *Client) AWSCustomerRedirect(ctx context.Context, amazonMarketplaceToken string) (*url.URL, error)

func (*Client) AcceptInvitation

func (c *Client) AcceptInvitation(ctx context.Context, payload types.AcceptInvitation) error

AcceptInvitation to a project. The project to which you join is parsed from the token.

func (*Client) ActiveTraceSession added in v0.6.1

func (c *Client) ActiveTraceSession(ctx context.Context, pipelineID string) (types.TraceSession, error)

ActiveTraceSession from a pipeline if any.

func (*Client) Agent

func (c *Client) Agent(ctx context.Context, agentID string) (types.Agent, error)

Agent by ID.

func (*Client) AgentConfigHistory

func (c *Client) AgentConfigHistory(ctx context.Context, agentID string, params types.AgentConfigHistoryParams) (types.AgentConfigHistory, error)

AgentConfigHistory in descending order. Every time an agent config is updated, a new history entry with the change is created.

func (*Client) AgentErrors added in v1.2.0

func (c *Client) AgentErrors(ctx context.Context, in types.ListAgentErrors) (types.AgentErrors, error)

func (*Client) AgentMetrics

func (c *Client) AgentMetrics(ctx context.Context, agentID string, params types.MetricsParams) (types.MetricsSummary, error)

AgentMetrics contains an overview of the Agent metrics. It includes metrics link the amount of records, bytes, and errors.

func (*Client) AgentMetricsByPlugin added in v0.17.0

func (c *Client) AgentMetricsByPlugin(ctx context.Context, agentID string, params types.MetricsParams) (types.MetricsSummaryPlugin, error)

AgentMetricsByPlugin contains an overview of the Agent metrics. It includes metrics link the amount of records, bytes, and errors per plugin.

func (*Client) AgentMetricsOverTimeByPlugin added in v0.17.0

func (c *Client) AgentMetricsOverTimeByPlugin(ctx context.Context, agentID string, params types.MetricsParams) (types.MetricsOverTimeByPlugin, error)

AgentMetricsOverTimeByPlugin contains an overview of the Agent metrics. It includes metrics link the amount of records, bytes, and errors per plugin.

func (*Client) AgentMetricsV1 added in v0.17.0

func (c *Client) AgentMetricsV1(ctx context.Context, agentID string, params types.MetricsParams) (types.AgentMetrics, error)

AgentMetricsV1 contains an overview of the aggregated metrics for an agent. It includes metrics link the amount of records, bytes, and errors per plugin.

func (*Client) AgentOverTimeMetrics added in v0.17.0

func (c *Client) AgentOverTimeMetrics(ctx context.Context, agentID string, params types.MetricsParams) (types.MetricsOverTime, error)

AgentOverTimeMetrics contains Agent metrics overtime. It includes metrics link the amount of records, bytes, and errors.

func (*Client) Agents

func (c *Client) Agents(ctx context.Context, projectID string, params types.AgentsParams) (types.Agents, error)

Agents from the given project in descending order.

func (*Client) ClusterObject added in v0.17.1

func (c *Client) ClusterObject(ctx context.Context, checkID string) (types.ClusterObject, error)

ClusterObject by ID.

func (*Client) ClusterObjects added in v0.17.1

func (c *Client) ClusterObjects(ctx context.Context, coreInstanceID string, params types.ClusterObjectParams) (types.ClusterObjects, error)

ClusterObjects in descending order.

func (*Client) ConfigSection added in v0.9.1

func (c *Client) ConfigSection(ctx context.Context, configSectionID string) (types.ConfigSection, error)

func (*Client) ConfigSections added in v0.9.1

func (c *Client) ConfigSections(ctx context.Context, projectID string, params types.ConfigSectionsParams) (types.ConfigSections, error)

func (*Client) CoreInstance added in v0.19.0

func (c *Client) CoreInstance(ctx context.Context, instanceID string) (types.CoreInstance, error)

CoreInstance by ID.

func (*Client) CoreInstanceCheck added in v0.9.1

func (c *Client) CoreInstanceCheck(ctx context.Context, checkID string) (types.CoreInstanceCheck, error)

CoreInstanceCheck by ID.

func (*Client) CoreInstanceChecks added in v0.9.1

func (c *Client) CoreInstanceChecks(ctx context.Context, coreInstanceID string, params types.CoreInstanceChecksParams) (types.CoreInstanceChecks, error)

CoreInstanceChecks in descending order.

func (*Client) CoreInstanceMetrics added in v0.15.0

func (c *Client) CoreInstanceMetrics(ctx context.Context, coreInstanceID string, params types.MetricsParams) (types.MetricsSummary, error)

CoreInstanceMetrics contains an overview of the Core Instance metrics. It includes metrics link the amount of records, bytes, and errors.

func (*Client) CoreInstanceMetricsByPlugin added in v0.15.0

func (c *Client) CoreInstanceMetricsByPlugin(ctx context.Context, coreInstanceID string, params types.MetricsParams) (types.MetricsSummaryPlugin, error)

CoreInstanceMetricsByPlugin contains an overview of the Core Instance metrics. It includes metrics link the amount of records, bytes, and errors per plugin.

func (*Client) CoreInstanceMetricsOverTimeByPlugin added in v0.15.0

func (c *Client) CoreInstanceMetricsOverTimeByPlugin(ctx context.Context, coreInstanceID string, params types.MetricsParams) (types.MetricsOverTimeByPlugin, error)

CoreInstanceMetricsOverTimeByPlugin contains an overview of the Core Instance metrics. It includes metrics link the amount of records, bytes, and errors per plugin.

func (*Client) CoreInstanceMetricsV1 added in v0.19.0

func (c *Client) CoreInstanceMetricsV1(ctx context.Context, instanceID string, params types.MetricsParams) (types.CoreInstanceMetricsV1, error)

CoreInstanceMetricsV1 contains an overview of the aggregated metrics for a project. It includes metrics link the amount of records, bytes, and errors per plugin.

func (*Client) CoreInstanceOverTimeMetrics added in v0.15.0

func (c *Client) CoreInstanceOverTimeMetrics(ctx context.Context, coreInstanceID string, params types.MetricsParams) (types.MetricsOverTime, error)

CoreInstanceOverTimeMetrics contains Core Instance metrics overtime. It includes metrics link the amount of records, bytes, and errors.

func (*Client) CoreInstancePing added in v0.19.0

func (c *Client) CoreInstancePing(ctx context.Context, instanceID string) (types.CoreInstancePingResponse, error)

CoreInstancePing by its ID.

func (*Client) CoreInstances added in v0.19.0

func (c *Client) CoreInstances(ctx context.Context, projectID string, params types.CoreInstancesParams) (types.CoreInstances, error)

CoreInstances from a project in descending order.

func (*Client) CreateAWSContractFromToken added in v1.2.0

func (c *Client) CreateAWSContractFromToken(ctx context.Context, in types.CreateAWSContractFromToken) error

func (*Client) CreateAgentError added in v1.2.0

func (c *Client) CreateAgentError(ctx context.Context, in types.CreateAgentError) (types.CreatedAgentError, error)

func (*Client) CreateClusterObject added in v0.17.1

func (c *Client) CreateClusterObject(ctx context.Context, coreInstanceID string, payload types.CreateClusterObject) (types.CreatedClusterObject, error)

CreateClusterObject within a core_instance.

func (*Client) CreateConfigSection added in v0.9.1

func (c *Client) CreateConfigSection(ctx context.Context, projectID string, in types.CreateConfigSection) (types.CreatedConfigSection, error)

func (*Client) CreateCoreInstance added in v0.19.0

func (c *Client) CreateCoreInstance(ctx context.Context, payload types.CreateCoreInstance) (types.CreatedCoreInstance, error)

CreateCoreInstance within a project. The project in which the core instance is created is parser from the authorization token. Users are not allowed to create core instances.

func (*Client) CreateCoreInstanceCheck added in v0.9.1

func (c *Client) CreateCoreInstanceCheck(ctx context.Context, coreInstanceID string, payload types.CreateCoreInstanceCheck) (types.CreatedCoreInstanceCheck, error)

CreateCoreInstanceCheck within a core_instance.

func (*Client) CreateEnvironment added in v0.3.1

func (c *Client) CreateEnvironment(ctx context.Context, projectID string, payload types.CreateEnvironment) (types.CreatedEnvironment, error)

CreateEnvironment within a project.

func (*Client) CreateFleet added in v1.1.0

func (c *Client) CreateFleet(ctx context.Context, in types.CreateFleet) (types.CreatedFleet, error)

func (*Client) CreateIngestCheck added in v0.15.0

func (c *Client) CreateIngestCheck(ctx context.Context, coreInstanceID string, payload types.CreateIngestCheck) (types.CreatedIngestCheck, error)

CreateIngestCheck within a core_instance.

func (*Client) CreateInvitation

func (c *Client) CreateInvitation(ctx context.Context, projectID string, payload types.CreateInvitation) error

CreateInvitation to a project. This will send an invitation email with a link to join to the email address provided.

func (*Client) CreatePipeline

func (c *Client) CreatePipeline(ctx context.Context, instanceID string, payload types.CreatePipeline) (types.CreatedPipeline, error)

CreatePipeline within a core instance. The pipeline name must be unique within the core instance. The resource profile must exist already. If you don't provide one, it will default to "best-effort-low-resource". Use them to easily deploy configured agents to the core instance.

func (*Client) CreatePipelineCheck added in v0.9.1

func (c *Client) CreatePipelineCheck(ctx context.Context, pipelineID string, payload types.CreatePipelineCheck) (types.CreatedPipelineCheck, error)

CreatePipelineCheck within a pipeline.

func (*Client) CreatePipelineFile

func (c *Client) CreatePipelineFile(ctx context.Context, pipelineID string, payload types.CreatePipelineFile) (types.CreatedPipelineFile, error)

CreatePipelineFile within a pipeline. The given name is unique within the pipeline. These files can be referenced by their name within a fluentbit configuration file like so `{{files.thename}}`. Use them to share common stuff like parsers.

func (*Client) CreatePipelinePort

func (c *Client) CreatePipelinePort(ctx context.Context, pipelineID string, payload types.CreatePipelinePort) (types.CreatedPipelinePort, error)

CreatePipelinePort within a pipeline. Ports can automatically be parsed from a config file, but this action allows you to programatically add more.

func (*Client) CreatePipelineSecret

func (c *Client) CreatePipelineSecret(ctx context.Context, pipelineID string, payload types.CreatePipelineSecret) (types.CreatedPipelineSecret, error)

CreatePipelineSecret within a pipeline. The given name is unique within the pipeline. These secrets can be referenced by their name within a fluentbit configuration file like so `{{secrets.thename}}`. Use them to hide sensible values from your config file.

func (*Client) CreateProcessingRule added in v0.9.1

func (c *Client) CreateProcessingRule(ctx context.Context, in types.CreateProcessingRule) (types.CreatedProcessingRule, error)

func (*Client) CreateProject

func (c *Client) CreateProject(ctx context.Context, payload types.CreateProject) (types.CreatedProject, error)

CreateProject creates a new project. A project is the base unit of work at Calyptia Cloud. You can register agents here, create core instances in which you can deploy an entire set of pipelines, and monitor them. You can even invite other people to the project and have a team.

func (*Client) CreateResourceProfile

func (c *Client) CreateResourceProfile(ctx context.Context, instanceID string, payload types.CreateResourceProfile) (types.CreatedResourceProfile, error)

CreateResourceProfile within a core instance. A resource profile is a specification of a resource used during the deployment of a pipeline. By default, when you setup a core instance, Calyptia Cloud will generate 3 resource profiles for you: - high-performance-guaranteed-delivery. - high-performance-optimal-throughput. - best-effort-low-resource.

func (*Client) CreateToken

func (c *Client) CreateToken(ctx context.Context, projectID string, payload types.CreateToken) (types.Token, error)

CreateToken within a project. These tokens are to authorize other applications to access the project. For example: - an agent might use it to register itself to the project. - you might create a new core instance in the project using the Calyptia CLI. - you might use it within the Calyptia CLI to grant access to your project.

func (*Client) CreateTraceRecord added in v0.6.1

func (c *Client) CreateTraceRecord(ctx context.Context, pipelineID string, in types.CreateTraceRecord) (types.CreatedTraceRecord, error)

CreateTraceRecord on the current active trace session on the pipeline. This endpoint is meant to be used by fluent-bit's tracing sidecar.

func (*Client) CreateTraceSession added in v0.6.1

func (c *Client) CreateTraceSession(ctx context.Context, pipelineID string, in types.CreateTraceSession) (types.CreatedTraceSession, error)

CreateTraceSession within a pipeline. A trace session can receive records from fluent-bit's tracing sidecar while this is enabled (see its lifespan). Only one trace session can be active at a time you can either terminate it and create a new one, or update the existing one and extend its lifespan.

func (*Client) DeleteAgent

func (c *Client) DeleteAgent(ctx context.Context, agentID string) error

DeleteAgent by its ID.

func (*Client) DeleteAgents added in v0.9.0

func (c *Client) DeleteAgents(ctx context.Context, projectID string, agentIDs ...string) error

DeleteAgents from a project passing a list of the IDs to be deleted.

func (*Client) DeleteClusterObject added in v0.17.1

func (c *Client) DeleteClusterObject(ctx context.Context, checkID string) error

DeleteClusterObject by its ID.

func (*Client) DeleteConfigSection added in v0.9.1

func (c *Client) DeleteConfigSection(ctx context.Context, configSectionID string) error

func (*Client) DeleteCoreInstance added in v0.19.0

func (c *Client) DeleteCoreInstance(ctx context.Context, instanceID string) error

DeleteCoreInstance by its ID.

func (*Client) DeleteCoreInstanceCheck added in v0.9.1

func (c *Client) DeleteCoreInstanceCheck(ctx context.Context, checkID string) error

DeleteCoreInstanceCheck by its ID.

func (*Client) DeleteCoreInstances added in v0.19.0

func (c *Client) DeleteCoreInstances(ctx context.Context, projectID string, instanceIDs ...string) error

DeleteCoreInstances from a project passing a list of the IDs to be deleted.

func (*Client) DeleteEnvironment added in v0.3.1

func (c *Client) DeleteEnvironment(ctx context.Context, environmentID string) error

DeleteEnvironment by its ID.

func (*Client) DeleteFleet added in v1.1.0

func (c *Client) DeleteFleet(ctx context.Context, fleetID string) (types.DeletedFleet, error)

func (*Client) DeleteIngestCheck added in v0.15.0

func (c *Client) DeleteIngestCheck(ctx context.Context, checkID string) error

DeleteIngestCheck by its ID.

func (*Client) DeletePipeline

func (c *Client) DeletePipeline(ctx context.Context, pipelineID string) error

DeletePipeline by its ID.

func (*Client) DeletePipelineCheck added in v0.9.1

func (c *Client) DeletePipelineCheck(ctx context.Context, checkID string) error

DeletePipelineCheck by its ID.

func (*Client) DeletePipelineClusterObjects added in v0.19.0

func (c *Client) DeletePipelineClusterObjects(ctx context.Context, pipelineID string, clusterObjectIDs ...string) error

DeletePipelineClusterObjects un-relate a list of cluster objects from a pipeline.

func (*Client) DeletePipelineFile

func (c *Client) DeletePipelineFile(ctx context.Context, fileID string) error

DeletePipelineFile by its ID. The file cannot be deleted if some pipeline config is still referencing it; you must delete the pipeline first if you want to delete the file.

func (*Client) DeletePipelinePort

func (c *Client) DeletePipelinePort(ctx context.Context, portID string) error

DeletePipelinePort by its ID.

func (*Client) DeletePipelineSecret

func (c *Client) DeletePipelineSecret(ctx context.Context, secretID string) error

DeletePipelineSecret by its ID. The secret cannot be deleted if some pipeline config is still referencing it; you must delete the pipeline first if you want to delete the secret.

func (*Client) DeletePipelines added in v0.9.0

func (c *Client) DeletePipelines(ctx context.Context, instanceID string, pipelineIDs ...string) error

DeletePipelines from a core instance passing a list of the IDs to be deleted.

func (*Client) DeleteProcessingRule added in v0.15.0

func (c *Client) DeleteProcessingRule(ctx context.Context, processingRuleID string) error

func (*Client) DeleteResourceProfile

func (c *Client) DeleteResourceProfile(ctx context.Context, resourceProfileID string) error

DeleteResourceProfile by its ID. The profile cannot be deleted if some pipeline is still referencing it; you must delete the pipeline first if you want to delete the profile.

func (*Client) DeleteToken

func (c *Client) DeleteToken(ctx context.Context, tokenID string) error

DeleteToken by its ID. Once deleted, any application that might has been using it, will stop working.

func (*Client) DismissAgentError added in v1.2.0

func (c *Client) DismissAgentError(ctx context.Context, in types.DismissAgentError) (types.DismissedAgentError, error)

func (*Client) Environments added in v0.3.1

func (c *Client) Environments(ctx context.Context, projectID string, params types.EnvironmentsParams) (types.Environments, error)

Environments from the given project in descending order.

func (*Client) Fleet added in v1.1.0

func (c *Client) Fleet(ctx context.Context, fleetID string) (types.Fleet, error)

func (*Client) FleetConfig added in v1.2.0

func (c *Client) FleetConfig(ctx context.Context, fleetID string, params types.FleetConfigParams) (*fluentbitconfig.Config, error)

func (*Client) Fleets added in v1.1.0

func (c *Client) Fleets(ctx context.Context, params types.FleetsParams) (types.Fleets, error)

func (*Client) Health added in v1.2.0

func (c *Client) Health(ctx context.Context) (types.Health, error)

func (*Client) IngestCheck added in v0.15.0

func (c *Client) IngestCheck(ctx context.Context, checkID string) (types.IngestCheck, error)

IngestCheck by ID.

func (*Client) IngestChecks added in v0.15.0

func (c *Client) IngestChecks(ctx context.Context, coreInstanceID string, params types.IngestChecksParams) (types.IngestChecks, error)

IngestChecks in descending order.

func (*Client) Members

func (c *Client) Members(ctx context.Context, projectID string, params types.MembersParams) (types.Memberships, error)

Members from a project in descending order.

func (*Client) Pipeline

func (c *Client) Pipeline(ctx context.Context, pipelineID string, params types.PipelineParams) (types.Pipeline, error)

Pipeline by ID.

func (*Client) PipelineCheck added in v0.9.1

func (c *Client) PipelineCheck(ctx context.Context, checkID string) (types.PipelineCheck, error)

PipelineCheck by ID.

func (*Client) PipelineChecks added in v0.9.1

func (c *Client) PipelineChecks(ctx context.Context, pipelineID string, params types.PipelineChecksParams) (types.PipelineChecks, error)

PipelineChecks in descending order.

func (*Client) PipelineClusterObjects added in v0.19.0

func (c *Client) PipelineClusterObjects(ctx context.Context, pipelineID string, params types.PipelineClusterObjectsParams) (types.ClusterObjects, error)

PipelineClusterObjects returns the entire set of cluster objects associated to a pipeline.

func (*Client) PipelineConfigHistory

func (c *Client) PipelineConfigHistory(ctx context.Context, pipelineID string, params types.PipelineConfigHistoryParams) (types.PipelineConfigHistory, error)

PipelineConfigHistory in descending order. Every time a pipeline config is updated, a new history entry with the change is created.

func (*Client) PipelineFile

func (c *Client) PipelineFile(ctx context.Context, fileID string) (types.PipelineFile, error)

PipelineFile by ID.

func (*Client) PipelineFiles

func (c *Client) PipelineFiles(ctx context.Context, pipelineID string, params types.PipelineFilesParams) (types.PipelineFiles, error)

PipelineFiles in descending order.

func (*Client) PipelineMetrics

func (c *Client) PipelineMetrics(ctx context.Context, pipelineID string, params types.MetricsParams) (types.MetricsSummary, error)

PipelineMetrics contains an overview of the Pipeline metrics. It includes metrics link the amount of records, bytes, and errors.

func (*Client) PipelineMetricsByPlugin added in v0.17.0

func (c *Client) PipelineMetricsByPlugin(ctx context.Context, pipelineID string, params types.MetricsParams) (types.MetricsSummaryPlugin, error)

PipelineMetricsByPlugin contains an overview of the Pipeline metrics. It includes metrics link the amount of records, bytes, and errors per plugin.

func (*Client) PipelineMetricsOverTimeByPlugin added in v0.17.0

func (c *Client) PipelineMetricsOverTimeByPlugin(ctx context.Context, pipelineID string, params types.MetricsParams) (types.MetricsOverTimeByPlugin, error)

PipelineMetricsOverTimeByPlugin contains an overview of the Pipeline metrics. It includes metrics link the amount of records, bytes, and errors per plugin.

func (*Client) PipelineMetricsV1 added in v0.17.0

func (c *Client) PipelineMetricsV1(ctx context.Context, pipelineID string, params types.MetricsParams) (types.AgentMetrics, error)

PipelineMetricsV1 contains an overview of the aggregated metrics for a pipeline. It includes metrics link the amount of records, bytes, and errors per plugin.

func (*Client) PipelineOverTimeMetrics added in v0.17.0

func (c *Client) PipelineOverTimeMetrics(ctx context.Context, pipelineID string, params types.MetricsParams) (types.MetricsOverTime, error)

PipelineOverTimeMetrics contains Pipeline metrics overtime. It includes metrics link the amount of records, bytes, and errors.

func (*Client) PipelinePort

func (c *Client) PipelinePort(ctx context.Context, portID string) (types.PipelinePort, error)

PipelinePort by ID.

func (*Client) PipelinePorts

func (c *Client) PipelinePorts(ctx context.Context, pipelineID string, params types.PipelinePortsParams) (types.PipelinePorts, error)

PipelinePorts in descending order.

func (*Client) PipelineSecret

func (c *Client) PipelineSecret(ctx context.Context, secretID string) (types.PipelineSecret, error)

PipelineSecret by ID.

func (*Client) PipelineSecrets

func (c *Client) PipelineSecrets(ctx context.Context, pipelineID string, params types.PipelineSecretsParams) (types.PipelineSecrets, error)

PipelineSecrets in descending order.

func (*Client) PipelineStatusHistory

func (c *Client) PipelineStatusHistory(ctx context.Context, pipelineID string, params types.PipelineStatusHistoryParams) (types.PipelineStatusHistory, error)

PipelineStatusHistory in descending order. Every time a pipeline status is changed, a new history entry with the change is created.

func (*Client) Pipelines

func (c *Client) Pipelines(ctx context.Context, instanceID string, params types.PipelinesParams) (types.Pipelines, error)

Pipelines from a core instance in descending order.

func (*Client) PipelinesMetricsV1 added in v0.19.0

func (c *Client) PipelinesMetricsV1(ctx context.Context, instanceID string, params types.PipelinesMetricsParams) (types.PipelinesMetrics, error)

PipelinesMetricsV1 get the metrics for a set of pipelineIDs belonging to a core instance (bulk mode).

func (*Client) PreviewProcessingRule added in v0.9.1

func (c *Client) PreviewProcessingRule(ctx context.Context, in types.PreviewProcessingRule) ([]types.FluentBitLog, error)

func (*Client) ProcessingRule added in v0.9.1

func (c *Client) ProcessingRule(ctx context.Context, processingRuleID string) (types.ProcessingRule, error)

func (*Client) ProcessingRules added in v0.9.1

func (c *Client) ProcessingRules(ctx context.Context, params types.ProcessingRulesParams) (types.ProcessingRules, error)

func (*Client) Project

func (c *Client) Project(ctx context.Context, projectID string) (types.Project, error)

Project by ID.

func (*Client) ProjectMetricsV1 added in v0.19.0

func (c *Client) ProjectMetricsV1(ctx context.Context, projectID string, params types.MetricsParams) (types.ProjectMetrics, error)

ProjectMetricsV1 contains an overview of the aggregated metrics for a project. It includes metrics link the amount of records, bytes, and errors per plugin.

func (*Client) ProjectPipelines

func (c *Client) ProjectPipelines(ctx context.Context, projectID string, params types.PipelinesParams) (types.Pipelines, error)

ProjectPipelines returns the entire set of pipelines from a project.

func (*Client) Projects

func (c *Client) Projects(ctx context.Context, params types.ProjectsParams) (types.Projects, error)

Projects you are a member of in descending order.

func (*Client) RegisterAgent

func (c *Client) RegisterAgent(ctx context.Context, payload types.RegisterAgent) (types.RegisteredAgent, error)

RegisterAgent within a project. The project in which the agent is registered is parsed from the authorization token. Users are not allowed to register agents.

func (*Client) ResourceProfile

func (c *Client) ResourceProfile(ctx context.Context, resourceProfileID string) (types.ResourceProfile, error)

ResourceProfile by ID.

func (*Client) ResourceProfiles

func (c *Client) ResourceProfiles(ctx context.Context, instanceID string, params types.ResourceProfilesParams) (types.ResourceProfiles, error)

ResourceProfiles from a core instance in descending order.

func (*Client) Search added in v1.2.0

func (c *Client) Search(ctx context.Context, in types.SearchQuery) ([]types.SearchResult, error)

func (*Client) SendVerificationEmail

func (c *Client) SendVerificationEmail(ctx context.Context) error

SendVerificationEmail sends a verification email to the user. When a new user registers within Calyptia Cloud with password, it should receive a verification email, in the case it didn't receive it, or the email expired already, use this endpoint to request a new one.

func (*Client) SetAgentToken

func (c *Client) SetAgentToken(s string)

SetAgentToken sets the "X-Agent-Token" header of the client.

func (*Client) SetCoreInstanceToken added in v0.19.0

func (c *Client) SetCoreInstanceToken(s string)

SetCoreInstanceToken sets the "X-Aggregator-Token" header of the client.

func (*Client) SetProjectToken

func (c *Client) SetProjectToken(s string) *Client

SetProjectToken sets the "X-Project-Token" header of the client.

func (*Client) SetUserAgent

func (c *Client) SetUserAgent(s string)

SetUserAgent sets the "User-Agent" header of the client.

func (*Client) TerminateActiveTraceSession added in v0.6.1

func (c *Client) TerminateActiveTraceSession(ctx context.Context, pipelineID string) (types.TerminatedTraceSession, error)

TerminateActiveTraceSession terminates the current active trace session on the pipeline.

func (*Client) Token

func (c *Client) Token(ctx context.Context, tokenID string) (types.Token, error)

Token by ID.

func (*Client) Tokens

func (c *Client) Tokens(ctx context.Context, projectID string, params types.TokensParams) (types.Tokens, error)

Tokens from a project.

func (*Client) TraceRecords added in v0.6.1

func (c *Client) TraceRecords(ctx context.Context, sessionID string, params types.TraceRecordsParams) (types.TraceRecords, error)

TraceRecords from a trace session. With backward pagination, the list is sorted by createdAt in descending order.

func (*Client) TraceSession added in v0.6.1

func (c *Client) TraceSession(ctx context.Context, sessionID string) (types.TraceSession, error)

TraceSession by ID. This can be still active or not.

func (*Client) TraceSessions added in v0.6.1

func (c *Client) TraceSessions(ctx context.Context, pipelineID string, params types.TraceSessionsParams) (types.TraceSessions, error)

TraceSessions from a pipeline. With backward pagination, the list is sorted by createdAt in descending order.

func (*Client) UpdateAgent

func (c *Client) UpdateAgent(ctx context.Context, agentID string, payload types.UpdateAgent) error

UpdateAgent by its ID. Users are allowed to only update a restricted set of fields (name); while agents are allowed to update the whole configuration.

func (*Client) UpdateClusterObject added in v0.17.1

func (c *Client) UpdateClusterObject(ctx context.Context, checkID string, opts types.UpdateClusterObject) error

UpdateClusterObject by its ID.

func (*Client) UpdateConfigSection added in v0.9.1

func (c *Client) UpdateConfigSection(ctx context.Context, configSectionID string, in types.UpdateConfigSection) (types.UpdatedConfigSection, error)

func (*Client) UpdateConfigSectionSet added in v0.9.1

func (c *Client) UpdateConfigSectionSet(ctx context.Context, pipelineID string, configSectionIDs ...string) error

func (*Client) UpdateCoreInstance added in v0.19.0

func (c *Client) UpdateCoreInstance(ctx context.Context, instanceID string, payload types.UpdateCoreInstance) error

UpdateCoreInstance by its ID.

func (*Client) UpdateCoreInstanceCheck added in v0.9.1

func (c *Client) UpdateCoreInstanceCheck(ctx context.Context, checkID string, opts types.UpdateCoreInstanceCheck) error

UpdateCoreInstanceCheck by its ID.

func (*Client) UpdateEnvironment added in v0.3.1

func (c *Client) UpdateEnvironment(ctx context.Context, environmentID string, payload types.UpdateEnvironment) error

UpdateEnvironment by its ID.

func (*Client) UpdateFleet added in v1.1.0

func (c *Client) UpdateFleet(ctx context.Context, in types.UpdateFleet) (types.UpdatedFleet, error)

func (*Client) UpdateIngestCheck added in v0.15.0

func (c *Client) UpdateIngestCheck(ctx context.Context, checkID string, opts types.UpdateIngestCheck) error

UpdateIngestCheck by its ID.

func (*Client) UpdatePipeline

func (c *Client) UpdatePipeline(ctx context.Context, pipelineID string, opts types.UpdatePipeline) (types.UpdatedPipeline, error)

UpdatePipeline by its ID.

func (*Client) UpdatePipelineCheck added in v0.9.1

func (c *Client) UpdatePipelineCheck(ctx context.Context, checkID string, opts types.UpdatePipelineCheck) error

UpdatePipelineCheck by its ID.

func (*Client) UpdatePipelineClusterObjects added in v0.19.0

func (c *Client) UpdatePipelineClusterObjects(ctx context.Context, pipelineID string, opts types.UpdatePipelineClusterObjects) error

UpdatePipelineClusterObjects update a list of related cluster objects to a pipeline.

func (*Client) UpdatePipelineFile

func (c *Client) UpdatePipelineFile(ctx context.Context, fileID string, opts types.UpdatePipelineFile) error

UpdatePipelineFile by its ID.

func (*Client) UpdatePipelinePort

func (c *Client) UpdatePipelinePort(ctx context.Context, portID string, opts types.UpdatePipelinePort) error

UpdatePipelinePort by its ID.

func (*Client) UpdatePipelineSecret

func (c *Client) UpdatePipelineSecret(ctx context.Context, secretID string, opts types.UpdatePipelineSecret) error

UpdatePipelineSecret by its ID.

func (*Client) UpdateProcessingRule added in v0.9.1

func (c *Client) UpdateProcessingRule(ctx context.Context, in types.UpdateProcessingRule) (types.UpdatedProcessingRule, error)

func (*Client) UpdateProject

func (c *Client) UpdateProject(ctx context.Context, projectID string, opts types.UpdateProject) error

UpdateProject by its ID.

func (*Client) UpdateResourceProfile

func (c *Client) UpdateResourceProfile(ctx context.Context, resourceProfileID string, opts types.UpdateResourceProfile) error

UpdateResourceProfile by its ID.

func (*Client) UpdateToken

func (c *Client) UpdateToken(ctx context.Context, tokenID string, opts types.UpdateToken) error

UpdateToken by its ID.

func (*Client) UpdateTraceSession added in v0.6.1

func (c *Client) UpdateTraceSession(ctx context.Context, sessionID string, in types.UpdateTraceSession) (types.UpdatedTraceSession, error)

UpdateTraceSession list of plugins to trace and/or lifespan. The session must still be active.

func (*Client) ValidateConfig

func (c *Client) ValidateConfig(ctx context.Context, agentType types.AgentType, payload types.ValidatingConfig) (types.ValidatedConfig, error)

ValidateConfig validates that an already parsed fluentbit or fluentd config is semantically valid. To parse the raw agent config take a look at https://github.com/calyptia/fluent-bit-config-parser.

func (*Client) ValidateConfigV2

func (c *Client) ValidateConfigV2(ctx context.Context, payload types.ValidatingConfig) (types.ValidatedConfigV2, error)

ValidateConfigV2 validates that an already parsed fluentbit(only) config to check if semantically valid To parse the raw agent config take a look at https://github.com/calyptia/fluent-bit-config-parser.

Directories

Path Synopsis
Package secrets provides RSA codec to work with Calyptia Cloud pipeline secrets.
Package secrets provides RSA codec to work with Calyptia Cloud pipeline secrets.
Package token provides a decoder for Calyptia Cloud projects tokens.
Package token provides a decoder for Calyptia Cloud projects tokens.

Jump to

Keyboard shortcuts

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