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
- Variables
- type Client
- func NewAutoDetectedClient(dockerAPIVersion, containerdNamespace, containerRuntime string) (Client, error)
- func NewClient(agentPID int) (c Client, err error)
- func NewContainerClient(dockerAPIVersion, containerdNamespace, containerID, runtime string) (Client, error)
- func NewContainerdClient(namespace, containerID string) (c Client, err error)
- func NewDockerClient(apiVersion string, containerID string) (c Client, err error)
- type ContainerdClient
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 NewContainerClient ¶ added in v1.67.3
func NewContainerdClient ¶ added in v1.67.3
NewContainerdClient creates a containerised agent control client for Containerd containers.
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.
Click to show internal directories.
Click to hide internal directories.