helpers

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 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 added in v1.8.0

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 added in v1.8.0

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 added in v1.8.0

func GetCurrentProcCapabilities() (*OSCapabilities, error)

func (*OSCapabilities) Clear added in v1.8.0

func (caps *OSCapabilities) Clear(c OSCapability)

func (*OSCapabilities) Has added in v1.8.0

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

func (*OSCapabilities) Set added in v1.8.0

func (caps *OSCapabilities) Set(c OSCapability)

type OSCapability added in v1.8.0

type OSCapability uint8

func (OSCapability) String added in v1.8.0

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