helpers

package
v2.0.4-alloy.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunCommand

func RunCommand(command string, stdin string, arguments ...string) (string, error)

func SetCurrentProcCapabilities

func SetCurrentProcCapabilities(caps *OSCapabilities) error

Types

type Command

type Command struct {
	*exec.Cmd
}

func NewCommand

func NewCommand(command string, arguments ...string) *Command

func (*Command) Run

func (c *Command) Run() (string, error)

func (*Command) WithStdin

func (c *Command) WithStdin(stdin string) *Command

type OSCapabilities

type OSCapabilities [2]unix.CapUserData

From the capget(2) manpage: Note that 64-bit capabilities use datap[0] and datap[1], whereas 32-bit capabilities use only datap[0].

func GetCurrentProcCapabilities

func GetCurrentProcCapabilities() (*OSCapabilities, error)

func (*OSCapabilities) Clear

func (caps *OSCapabilities) Clear(c OSCapability)

func (*OSCapabilities) Has

func (caps *OSCapabilities) Has(c OSCapability) bool

func (*OSCapabilities) Set

func (caps *OSCapabilities) Set(c OSCapability)

type OSCapability

type OSCapability uint8

func (OSCapability) String

func (c OSCapability) String() string

Directories

Path Synopsis
Package container provides helper tools to inspect container information
Package container provides helper tools to inspect container information

Jump to

Keyboard shortcuts

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