Documentation
¶
Index ¶
- func Acquire(size BufferSize) *bytes.Buffer
- func BufferedRead(name string, buf *bytes.Buffer) error
- func CGroup(pid int, hostfs ...string) (podId, container string, err error)
- func Decrypt(res string) (string, error)
- func DecryptWithPrivateKey(encrypted string, privateKey *rsa.PrivateKey) (res []byte, err error)
- func Dup(s string) string
- func Encrypt(data string) (string, error)
- func EncryptWithPublicKey(data []byte, publicKey *rsa.PublicKey) (res string, err error)
- func Execute(ctx context.Context, command string, args ...string) ([]byte, error)
- func HC() *http.Client
- func IsUnixSockFile(filename string) bool
- func LoadGroups(data []byte) (groups types.Groups, err error)
- func LoadUsers(data []byte) (users types.Users, err error)
- func MD5(args ...any) string
- func ParseContainerIDByPid(pid int) (containerId string, err error)
- func Recycle(buf *bytes.Buffer)
- func SHA1(args ...any) string
- func SHA256(args ...any) string
- func Uname() (*types.Utsname, error)
- type BufferSize
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Acquire ¶
func Acquire(size BufferSize) *bytes.Buffer
func DecryptWithPrivateKey ¶
func DecryptWithPrivateKey(encrypted string, privateKey *rsa.PrivateKey) (res []byte, err error)
func EncryptWithPublicKey ¶
func IsUnixSockFile ¶
IsUnixSockFile check if specified file is local unix socket file. Unlike named pipes which allow only unidirectional data flow, sockets are fully duplex-capable. A UNIX socket is marked with an s as the first letter of the mode string, e.g. srwxrwxrwx /tmp/.X11-unix/X0
func ParseContainerIDByPid ¶
Types ¶
type BufferSize ¶
type BufferSize int
const ( BufferSize1K BufferSize = 0x1 << (10 + iota) BufferSize2K BufferSize4K BufferSize8K BufferSize16K BufferSizeMax )
Click to show internal directories.
Click to hide internal directories.