agentclientparams

package
v0.76.0-devel Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package agentclientparams implements function parameters for [e2e.Agent]

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Params)

Option alias to a functional option changing a given Params instance

func WithAgentInstallPath

func WithAgentInstallPath(path string) Option

WithAgentInstallPath sets the agent installation path

func WithAuthToken

func WithAuthToken(authToken string) Option

WithAuthToken sets the auth token.

func WithAuthTokenPath

func WithAuthTokenPath(path string) Option

WithAuthTokenPath sets the path to the auth token file. The file is read from the remote host. This is not used if the auth token is provided directly with WithAuthToken.

func WithProcessAgent

func WithProcessAgent() Option

WithProcessAgent enables waiting for the Process Agent, using the default API port.

func WithProcessAgentOnPort

func WithProcessAgentOnPort(port int) Option

WithProcessAgentOnPort enables waiting for the Process Agent, using the given port for the API.

func WithSecurityAgent

func WithSecurityAgent() Option

WithSecurityAgent enables waiting for the Security Agent, using the default API port.

func WithSecurityAgentOnPort

func WithSecurityAgentOnPort(port int) Option

WithSecurityAgentOnPort enables waiting for the Security Agent, using the given port for the API.

func WithSkipWaitForAgentReady

func WithSkipWaitForAgentReady() Option

WithSkipWaitForAgentReady skips waiting for agent readiness after setting up the agent client Use it to testagent configuration that are expected to have an unhealthy agent

func WithTraceAgent

func WithTraceAgent() Option

WithTraceAgent enables waiting for the Trace Agent, using the default API port.

func WithTraceAgentOnPort

func WithTraceAgentOnPort(port int) Option

WithTraceAgentOnPort enables waiting for the Trace Agent, using the given port for the API.

func WithWaitForDuration

func WithWaitForDuration(d time.Duration) Option

WithWaitForDuration sets the duration to wait for the agents to be ready.

func WithWaitForTick

func WithWaitForTick(d time.Duration) Option

WithWaitForTick sets the duration between checks for the agents to be ready.

type Params

type Params struct {
	ShouldWaitForReady bool
	AgentInstallPath   string

	AuthToken         string
	AuthTokenPath     string
	ProcessAgentPort  int
	TraceAgentPort    int
	SecurityAgentPort int
	WaitForDuration   time.Duration
	WaitForTick       time.Duration
}

Params defines the parameters for the Agent client. The Params configuration uses the Functional options pattern.

The available options are:

func NewParams

func NewParams(osfam osComp.Family, options ...Option) *Params

NewParams creates a new instance of Agent client params default ShouldWaitForReady: true

Jump to

Keyboard shortcuts

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