Documentation
¶
Index ¶
- Constants
- Variables
- func BifroestBinaryDirLocation(os Os) string
- func BifroestBinaryFileLocation(os Os) string
- func BifroestOciBinaryDirLocation(os Os) string
- func BifroestOciBinaryFileLocation(os Os) string
- func CanonicalPath(path string) (string, error)
- func CloneFile(f CloneableFile) (*os.File, error)
- func EnrichCredentials(credentials *syscall.Credential, plainUser, plainGroup string) error
- func FormatVersion(v Version, format VersionFormat) string
- func IsBinaryCompatibleWithHost(binaryOs Os, binaryArch Arch, hostOs Os, hostArch Arch) bool
- func IsClosedError(err error) bool
- func IsNotExist(err error) bool
- func VersionToMap(v Version) map[string]any
- type Arch
- func (this Arch) Bare() string
- func (this Arch) IsEqualTo(other any) bool
- func (this Arch) IsZero() bool
- func (this Arch) MarshalText() ([]byte, error)
- func (this Arch) Oci() string
- func (this *Arch) Set(plain string) error
- func (this *Arch) SetOci(plain string) error
- func (this Arch) String() string
- func (this *Arch) UnmarshalText(in []byte) error
- func (this Arch) Validate() error
- type Archs
- type CloneableFile
- type Edition
- type Editions
- type EnvVars
- func (this *EnvVars) Add(in ...string)
- func (this *EnvVars) AddAllOf(in EnvVars)
- func (this EnvVars) Clone() EnvVars
- func (this *EnvVars) Set(kOrV ...string)
- func (this *EnvVars) SetCanonical(kOrV ...string)
- func (this EnvVars) SetEnv(key, val string)
- func (this *EnvVars) String() string
- func (this EnvVars) Strings() []string
- type FileMode
- type Os
- func (this Os) AppendExtToFilename(filename string) string
- func (this Os) IsEqualTo(other any) bool
- func (this Os) IsUnix() bool
- func (this Os) IsZero() bool
- func (this Os) MarshalText() ([]byte, error)
- func (this *Os) Set(plain string) error
- func (this *Os) SetOci(plain string) error
- func (this Os) String() string
- func (this *Os) UnmarshalText(in []byte) error
- func (this Os) Validate() error
- type Oses
- type Signal
- func (this *Signal) DecodeMsgPack(dec codec.MsgPackDecoder) error
- func (this *Signal) DecodeMsgpack(dec *msgpack.Decoder) (err error)
- func (this Signal) EncodeMsgPack(enc codec.MsgPackEncoder) error
- func (this Signal) EncodeMsgpack(enc *msgpack.Encoder) error
- func (this Signal) IsEqualTo(other any) bool
- func (this Signal) IsZero() bool
- func (this Signal) MarshalText() ([]byte, error)
- func (this Signal) Native() syscall.Signal
- func (this Signal) SendToPid(pid int) error
- func (this Signal) SendToProcess(p *os.Process) error
- func (this *Signal) Set(plain string) error
- func (this Signal) String() string
- func (this *Signal) UnmarshalText(text []byte) error
- type Version
- type VersionFeature
- type VersionFeatureCategory
- type VersionFeatures
- type VersionFormat
Constants ¶
View Source
const ( BifroestBinaryDirLocationUnix = `/usr/bin` BifroestBinaryDirLocationDarwin = `/usr/local/bin` BifroestBinaryDirLocationWindows = `C:\Program Files\Engity\Bifroest` BifroestBinaryFileLocationUnix = BifroestBinaryDirLocationUnix + `/bifroest` BifroestBinaryFileLocationDarwin = BifroestBinaryDirLocationDarwin + `/bifroest` BifroestBinaryFileLocationWindows = BifroestBinaryDirLocationWindows + `\bifroest.exe` )
View Source
const ( // Signal values are part of the Bifroest protocol and stay compatible with Linux. SIGHUP = Signal(1) SIGINT = Signal(2) SIGQUIT = Signal(3) SIGILL = Signal(4) SIGTRAP = Signal(5) SIGABRT = Signal(6) SIGIOT = SIGABRT SIGBUS = Signal(7) SIGFPE = Signal(8) SIGKILL = Signal(9) SIGUSR1 = Signal(10) SIGSEGV = Signal(11) SIGUSR2 = Signal(12) SIGPIPE = Signal(13) SIGALRM = Signal(14) SIGTERM = Signal(15) SIGCHLD = Signal(17) SIGCLD = SIGCHLD SIGCONT = Signal(18) SIGSTOP = Signal(19) SIGTSTP = Signal(20) SIGTTIN = Signal(21) SIGTTOU = Signal(22) SIGURG = Signal(23) SIGXCPU = Signal(24) SIGXFSZ = Signal(25) SIGVTALRM = Signal(26) SIGPROF = Signal(27) SIGWINCH = Signal(28) SIGIO = Signal(29) SIGPOLL = SIGIO SIGPWR = Signal(30) SIGSYS = Signal(31) )
Variables ¶
View Source
var ErrUnknownSignal = errors.New("unknown signal")
Functions ¶
func BifroestBinaryDirLocation ¶ added in v0.5.0
func BifroestBinaryFileLocation ¶ added in v0.5.0
func CanonicalPath ¶
CanonicalPath returns an absolute path with symlinks in its longest existing prefix resolved. A missing path suffix is preserved without creating it.
func EnrichCredentials ¶
func EnrichCredentials(credentials *syscall.Credential, plainUser, plainGroup string) error
func FormatVersion ¶ added in v0.4.0
func FormatVersion(v Version, format VersionFormat) string
func IsBinaryCompatibleWithHost ¶ added in v0.4.0
func IsClosedError ¶ added in v0.4.0
func IsNotExist ¶
func VersionToMap ¶ added in v0.4.0
Types ¶
type Arch ¶ added in v0.4.0
type Arch uint8
func (Arch) MarshalText ¶ added in v0.4.0
func (*Arch) UnmarshalText ¶ added in v0.4.0
type Archs ¶ added in v0.5.0
type Archs []Arch
func AllArchVariants ¶ added in v0.5.0
func AllArchVariants() Archs
type CloneableFile ¶ added in v0.4.0
type Edition ¶ added in v0.5.0
type Edition uint8
func (Edition) MarshalText ¶ added in v0.5.0
func (*Edition) UnmarshalText ¶ added in v0.5.0
type Editions ¶ added in v0.5.0
type Editions []Edition
func AllEditionVariants ¶ added in v0.5.0
func AllEditionVariants() Editions
type EnvVars ¶
func (*EnvVars) SetCanonical ¶
type Os ¶ added in v0.4.0
type Os uint8
func (Os) AppendExtToFilename ¶ added in v0.5.0
func (Os) MarshalText ¶ added in v0.4.0
func (*Os) UnmarshalText ¶ added in v0.4.0
type Oses ¶ added in v0.5.0
type Oses []Os
func AllOsVariants ¶ added in v0.5.0
func AllOsVariants() Oses
type Signal ¶
type Signal uint16
func (*Signal) DecodeMsgPack ¶ added in v0.4.0
func (this *Signal) DecodeMsgPack(dec codec.MsgPackDecoder) error
func (*Signal) DecodeMsgpack ¶ added in v0.4.0
func (Signal) EncodeMsgPack ¶ added in v0.4.0
func (this Signal) EncodeMsgPack(enc codec.MsgPackEncoder) error
func (Signal) EncodeMsgpack ¶ added in v0.4.0
func (Signal) MarshalText ¶
func (*Signal) UnmarshalText ¶
type VersionFeature ¶ added in v0.4.0
type VersionFeature interface {
Name() string
}
type VersionFeatureCategory ¶ added in v0.4.0
type VersionFeatureCategory interface {
Name() string
ForEach(func(VersionFeature))
}
type VersionFeatures ¶ added in v0.4.0
type VersionFeatures interface {
ForEach(func(VersionFeatureCategory))
}
type VersionFormat ¶ added in v0.4.0
type VersionFormat uint8
const ( VersionFormatShort VersionFormat = iota VersionFormatLong )
Click to show internal directories.
Click to hide internal directories.