sender

package
v1.67.3 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0

Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const (
	RuntimeDocker     = "docker"
	RuntimeContainerd = "containerd"
)

Variables

View Source
var RequiredContainerIDErr = errors.New("container ID of the agent is required")

RequiredContainerIDErr is the error to return when container ID is not provided.

View Source
var RequiredPIDErr = errors.New("process PID of the agent is required")

RequiredPIDErr is the error to return when the process ID is not provided.

Functions

This section is empty.

Types

type Client

type Client interface {
	// Notify will send a notification that will be captured by the agent which will run a handler.
	Notify(ctx context.Context, message ipc.Message) error

	// GetID returns the identification for the notified agent.
	GetID() string
}

Client is used to notify a running agent process.

func NewAutoDetectedClient

func NewAutoDetectedClient(dockerAPIVersion, containerdNamespace, containerRuntime string) (Client, error)

NewAutoDetectedClient will try to detect the NRIA instance type and return a notification client for it.

func NewClient

func NewClient(agentPID int) (c Client, err error)

NewClient creates a unix process based agent control client.

func NewContainerClient added in v1.67.3

func NewContainerClient(dockerAPIVersion, containerdNamespace, containerID, runtime string) (Client, error)

func NewContainerdClient added in v1.67.3

func NewContainerdClient(namespace, containerID string) (c Client, err error)

NewContainerdClient creates a containerised agent control client for Containerd containers.

func NewDockerClient added in v1.67.3

func NewDockerClient(apiVersion string, containerID string) (c Client, err error)

NewDockerClient creates a containerised agent control client for Docker containers. Didn't use helpers.DockerClient because it'll broad the interface breaking SRP.

type ContainerdClient added in v1.67.3

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

func (*ContainerdClient) GetID added in v1.67.3

func (c *ContainerdClient) GetID() string

GetID returns the identification for the notified agent.

func (*ContainerdClient) Notify added in v1.67.3

func (c *ContainerdClient) Notify(ctx context.Context, _ ipc.Message) error

Notify will notify a running agent process inside a docker container.

Jump to

Keyboard shortcuts

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