binding

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package binding is the actual package binding part that requires the libveinmind library through pkg-config, and and attempt to reconstruct the API interface from it.

Index

Constants

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorType

type ErrorType = C.veinmind_err_t

type Handle

type Handle IDType

Handle to the resource managed by the API binding.

func ContainerdMakeNewOptionList added in v1.1.0

func ContainerdMakeNewOptionList() Handle

func ContainerdNew

func ContainerdNew(opts Handle) (Handle, error)

func ContainerdWithConfigPath added in v1.1.0

func ContainerdWithConfigPath(path string) Handle

func ContainerdWithRootDir added in v1.1.0

func ContainerdWithRootDir(path string) Handle

func ContainerdWithUniqueDesc added in v1.1.0

func ContainerdWithUniqueDesc(desc string) Handle

func DockerMakeNewOptionList added in v1.1.0

func DockerMakeNewOptionList() Handle

func DockerNew

func DockerNew(opts Handle) (Handle, error)

func DockerWithConfigPath added in v1.1.0

func DockerWithConfigPath(path string) Handle

func DockerWithDataRootDir added in v1.1.0

func DockerWithDataRootDir(path string) Handle

func DockerWithUniqueDesc added in v1.1.0

func DockerWithUniqueDesc(desc string) Handle

func NewBytes

func NewBytes(b []byte) Handle

NewBytes pushes a bytes buffer and creates its handle.

func NewString

func NewString(str string) Handle

NewString pushes a string and creates its handle.

func RemoteNew added in v1.4.0

func RemoteNew(root string) (Handle, error)

func TarballNew added in v1.3.0

func TarballNew(root string) (Handle, error)

func (Handle) Append added in v1.1.0

func (h Handle) Append(item Handle)

func (Handle) Bytes

func (h Handle) Bytes() []byte

Bytes returns the underying byte slice.

func (Handle) BytesToString

func (h Handle) BytesToString() Handle

BytesToString creates a string from bytes.

func (Handle) Close

func (h Handle) Close() error

func (Handle) ContainerID added in v1.2.0

func (h Handle) ContainerID() string

func (Handle) ContainerImageID added in v1.2.0

func (h Handle) ContainerImageID() string

func (Handle) ContainerName added in v1.2.1

func (h Handle) ContainerName() string

func (Handle) ContainerOCISpecMarshalJSON added in v1.2.0

func (h Handle) ContainerOCISpecMarshalJSON() ([]byte, error)

func (Handle) ContainerOCIStateMarshalJSON added in v1.2.1

func (h Handle) ContainerOCIStateMarshalJSON() ([]byte, error)

func (Handle) ContainerdUniqueDesc added in v1.1.0

func (h Handle) ContainerdUniqueDesc() string

func (Handle) Crop

func (h Handle) Crop(begin, end int) Handle

Crop creates a new slice at specified range.

func (Handle) DockerContainerConfig added in v1.2.1

func (h Handle) DockerContainerConfig() ([]byte, error)

func (Handle) DockerImageGetLayerDiffID

func (h Handle) DockerImageGetLayerDiffID(i int) (string, error)

func (Handle) DockerImageNumLayers

func (h Handle) DockerImageNumLayers() int

func (Handle) DockerImageOpenLayer

func (h Handle) DockerImageOpenLayer(i int) (Handle, error)

func (Handle) DockerLayerID

func (h Handle) DockerLayerID() string

func (Handle) DockerLayerOpaques added in v1.5.0

func (h Handle) DockerLayerOpaques() ([]string, error)

func (Handle) DockerLayerWhiteouts added in v1.5.0

func (h Handle) DockerLayerWhiteouts() ([]string, error)

func (Handle) DockerUniqueDesc added in v1.1.0

func (h Handle) DockerUniqueDesc() string

func (Handle) Error

func (h Handle) Error() error

Error formats the error by brutely return error string.

func (Handle) ErrorMessage

func (h Handle) ErrorMessage() string

func (Handle) ErrorString

func (h Handle) ErrorString() string

func (Handle) ErrorUnwrap

func (h Handle) ErrorUnwrap() Handle
func (h Handle) EvalSymlink(path string) (string, error)

func (Handle) FileInfoModTime

func (h Handle) FileInfoModTime() int64

func (Handle) FileInfoMode

func (h Handle) FileInfoMode() uint32

func (Handle) FileInfoName

func (h Handle) FileInfoName() string

func (Handle) FileInfoSize

func (h Handle) FileInfoSize() SizeType

func (Handle) FileInfoSys

func (h Handle) FileInfoSys() Handle

func (Handle) FileStat

func (h Handle) FileStat() (Handle, error)

func (*Handle) Free

func (h *Handle) Free()

Free the object registry occupied by the.

func (Handle) ID

func (h Handle) ID() IDType

ID returns the underlying id value type.

func (Handle) ImageID

func (h Handle) ImageID() string

func (Handle) ImageOCISpecV1MarshalJSON

func (h Handle) ImageOCISpecV1MarshalJSON() ([]byte, error)

func (Handle) ImageRepoRefs

func (h Handle) ImageRepoRefs() ([]string, error)

func (Handle) ImageRepos

func (h Handle) ImageRepos() ([]string, error)

func (Handle) Index

func (h Handle) Index(i int) Handle

Index create a new object at specified index.

func (Handle) Int32 added in v1.2.0

func (h Handle) Int32() int32

Int32 return the parsed of int32 object.

func (Handle) Int32Array added in v1.2.0

func (h Handle) Int32Array() []int32

Int32Array return the parsed array of int32 object.

func (Handle) IsEOFError

func (h Handle) IsEOFError() bool

func (Handle) IsEOK

func (h Handle) IsEOK() bool

func (Handle) IsNil

func (h Handle) IsNil() bool

IsNil judges whether the binding is null handle.

func (Handle) IsOSPathError

func (h Handle) IsOSPathError() bool

func (Handle) IsSyscallError

func (h Handle) IsSyscallError() bool

func (Handle) IsWrapError

func (h Handle) IsWrapError() bool

func (Handle) Length

func (h Handle) Length() int

Length returns the length of the specified Handle.

func (Handle) Lstat

func (h Handle) Lstat(path string) (Handle, error)

func (Handle) OSPathError

func (h Handle) OSPathError() *os.PathError

func (Handle) OSPathErrorGetOp

func (h Handle) OSPathErrorGetOp() string

func (Handle) OSPathErrorGetPath

func (h Handle) OSPathErrorGetPath() string

func (Handle) Open

func (h Handle) Open(path string) (Handle, error)

func (Handle) ProcessChildren added in v1.2.0

func (h Handle) ProcessChildren() (Handle, error)

func (Handle) ProcessCmdline added in v1.2.0

func (h Handle) ProcessCmdline() (string, error)

func (Handle) ProcessCreateTime added in v1.2.1

func (h Handle) ProcessCreateTime() (int64, error)

func (Handle) ProcessCwd added in v1.2.0

func (h Handle) ProcessCwd() (string, error)

func (Handle) ProcessEnviron added in v1.2.0

func (h Handle) ProcessEnviron() ([]string, error)

func (Handle) ProcessExe added in v1.2.0

func (h Handle) ProcessExe() (string, error)

func (Handle) ProcessGids added in v1.2.0

func (h Handle) ProcessGids() ([]int32, error)

func (Handle) ProcessHostPid added in v1.2.1

func (h Handle) ProcessHostPid() (int32, error)

func (Handle) ProcessName added in v1.2.0

func (h Handle) ProcessName() (string, error)

func (Handle) ProcessParent added in v1.2.0

func (h Handle) ProcessParent() (Handle, error)

func (Handle) ProcessPid added in v1.2.0

func (h Handle) ProcessPid() (int32, error)

func (Handle) ProcessPpid added in v1.2.0

func (h Handle) ProcessPpid() (int32, error)

func (Handle) ProcessStatus added in v1.2.1

func (h Handle) ProcessStatus() (string, error)

func (Handle) ProcessUids added in v1.2.0

func (h Handle) ProcessUids() ([]int32, error)

func (Handle) PsutilNewProcess added in v1.2.0

func (h Handle) PsutilNewProcess(pid int32) (Handle, error)

func (Handle) PsutilPidExists added in v1.2.0

func (h Handle) PsutilPidExists(pid int32) (bool, error)

func (Handle) PsutilPids added in v1.2.0

func (h Handle) PsutilPids() ([]int32, error)

func (*Handle) Ptr

func (h *Handle) Ptr() *IDType

Ptr returns the underlying pointer type.

func (Handle) RawPointer

func (h Handle) RawPointer() unsafe.Pointer

RawPointer returns the raw pointer of the object.

func (Handle) Read

func (h Handle) Read(bytes Handle) (SizeType, error)

func (Handle) ReadAt

func (h Handle) ReadAt(bytes Handle, off int64) (SizeType, error)

func (Handle) Readdir

func (h Handle) Readdir(path string) (Handle, error)
func (h Handle) Readlink(path string) (string, error)

func (Handle) RemoteImageGetLayerDiffID added in v1.5.1

func (h Handle) RemoteImageGetLayerDiffID(i int) (string, error)

func (Handle) RemoteImageNumLayers added in v1.4.0

func (h Handle) RemoteImageNumLayers() int

func (Handle) RemoteImageOpenLayer added in v1.4.0

func (h Handle) RemoteImageOpenLayer(i int) (Handle, error)

func (Handle) RemoteLayerId added in v1.4.0

func (h Handle) RemoteLayerId() string

func (Handle) RemoteLayerOpaques added in v1.5.0

func (h Handle) RemoteLayerOpaques() ([]string, error)

func (Handle) RemoteLayerWhiteouts added in v1.5.0

func (h Handle) RemoteLayerWhiteouts() ([]string, error)

func (Handle) RemoteLoad added in v1.4.0

func (h Handle) RemoteLoad(imageRef, username, password string, insecure bool) ([]string, error)

func (Handle) RuntimeFindContainerIDs added in v1.2.0

func (h Handle) RuntimeFindContainerIDs(pattern string) ([]string, error)

func (Handle) RuntimeFindImageIDs

func (h Handle) RuntimeFindImageIDs(pattern string) ([]string, error)

func (Handle) RuntimeListContainerIDs added in v1.2.0

func (h Handle) RuntimeListContainerIDs() ([]string, error)

func (Handle) RuntimeListImageIDs

func (h Handle) RuntimeListImageIDs() ([]string, error)

func (Handle) RuntimeOpenContainerByID added in v1.2.0

func (h Handle) RuntimeOpenContainerByID(id string) (Handle, error)

func (Handle) RuntimeOpenImageByID

func (h Handle) RuntimeOpenImageByID(id string) (Handle, error)

func (Handle) Seek added in v1.1.0

func (h Handle) Seek(offset int64, whence int) (int64, error)

func (Handle) Stat

func (h Handle) Stat(path string) (Handle, error)

func (Handle) String

func (h Handle) String() string

String returns the underlying string object.

func (Handle) StringArray

func (h Handle) StringArray() []string

StringArray returns the parsed array of string object.

func (Handle) StringToBytes

func (h Handle) StringToBytes() Handle

StringToBytes creates a bytes from strin.

func (Handle) SyscallError

func (h Handle) SyscallError() syscall.Errno

Errno formats the error by converting it into syscall.Errno.

func (Handle) SyscallErrorGetErrno

func (h Handle) SyscallErrorGetErrno() SizeType

func (Handle) TarballImageNumLayers added in v1.3.6

func (h Handle) TarballImageNumLayers() int

func (Handle) TarballImageOpenLayer added in v1.3.6

func (h Handle) TarballImageOpenLayer(i int) (Handle, error)

func (Handle) TarballLayerId added in v1.3.6

func (h Handle) TarballLayerId() string

func (Handle) TarballLayerOpaques added in v1.5.0

func (h Handle) TarballLayerOpaques() ([]string, error)

func (Handle) TarballLayerWhiteouts added in v1.5.0

func (h Handle) TarballLayerWhiteouts() ([]string, error)

func (Handle) TarballLoad added in v1.3.0

func (h Handle) TarballLoad(tarPath string) ([]string, error)

func (Handle) TarballRemoveImageByID added in v1.3.0

func (h Handle) TarballRemoveImageByID(id string) error

func (Handle) Walk

func (h Handle) Walk(path string, f WalkFunc) error

func (Handle) WrapError

func (h Handle) WrapError() *WrapError

func (Handle) Write

func (h Handle) Write(bytes Handle) (SizeType, error)

func (Handle) WriteAt

func (h Handle) WriteAt(bytes Handle, off int64) (SizeType, error)

type IDType

type IDType = C.veinmind_id_t

type RuntimeError

type RuntimeError ErrorType

RuntimeError is the error that must be thrown out.

func (RuntimeError) Error

func (r RuntimeError) Error() string

type SizeType

type SizeType = C.size_t

type WalkFunc

type WalkFunc func(name string, info Handle, err error) error

type WrapError

type WrapError struct {
	// contains filtered or unexported fields
}

WrapError is the error that stacks another error.

func (WrapError) Error

func (w WrapError) Error() string

func (WrapError) Unwrap

func (w WrapError) Unwrap() error

Jump to

Keyboard shortcuts

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