ipcimpl

package module
v0.74.0-devel Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package ipcimpl implements the IPC component.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provides

type Provides struct {
	Comp       ipc.Component
	HTTPClient ipc.HTTPClient
}

Provides defines the output of the ipc component

func NewInsecureComponent

func NewInsecureComponent(reqs Requires) Provides

NewInsecureComponent creates an IPC component instance suitable for specific commands (like 'flare' or 'diagnose') that must function even when the main Agent isn't running or IPC artifacts (like auth tokens) are missing or invalid.

This constructor *always* succeeds, unlike NewReadWriteComponent or NewReadOnlyComponent which might fail if artifacts are absent or incorrect. However, the resulting IPC component instance might be non-functional or only partially functional, potentially leading to failures later, such as rejected connections during the IPC handshake if communication with the core Agent is attempted.

WARNING: This constructor is intended *only* for edge cases like diagnostics and flare generation. Using it in standard agent processes or commands that rely on stable IPC communication will likely lead to unexpected runtime errors or security issues.

func NewReadOnlyComponent

func NewReadOnlyComponent(reqs Requires) (Provides, error)

NewReadOnlyComponent creates a new ipc component by trying to read the auth artifacts on filesystem. If the auth artifacts are not found, it will return an error.

func NewReadWriteComponent

func NewReadWriteComponent(reqs Requires) (Provides, error)

NewReadWriteComponent creates a new ipc component by trying to read the auth artifacts on filesystem, and if they are not found, it will create them.

type Requires

type Requires struct {
	Conf config.Component
	Log  log.Component
}

Requires defines the dependencies for the ipc component

Jump to

Keyboard shortcuts

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