sender

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 12 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

This section is empty.

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

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

Client is used to notify a running agent process.

func NewAutoDetectedClient

func NewAutoDetectedClient(dockerAPIVersion 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 NewContainerisedClient

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

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

Jump to

Keyboard shortcuts

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