Documentation
¶
Index ¶
- Constants
- Variables
- func RangesInvalidErr() error
- type ExitCode
- func (it *ExitCode) AsBasicByteEnumContractsBinder() coreinterface.BasicByteEnumContractsBinder
- func (it *ExitCode) AsBasicByteEnumContractsDelegateBinder() coreinterface.BasicByteEnumContractsDelegateBinder
- func (it *ExitCode) AsBasicEnumContractsBinder() coreinterface.BasicEnumContractsBinder
- func (it *ExitCode) AsJsonMarshaller() corejson.JsonMarshaller
- func (it ExitCode) IsActiveRunning() bool
- func (it ExitCode) IsAllOf(codes ...int) bool
- func (it ExitCode) IsAnyOf(codes ...int) bool
- func (it ExitCode) IsAnyOfExitCode(anyOfItems ...ExitCode) bool
- func (it ExitCode) IsDeadButPidExists() bool
- func (it ExitCode) IsDeadButVarLockFileExists() bool
- func (it ExitCode) IsDefined() bool
- func (it ExitCode) IsEqual(code int) bool
- func (it ExitCode) IsFailed() bool
- func (it ExitCode) IsInvalidCode() bool
- func (it ExitCode) IsInvalidService() bool
- func (it ExitCode) IsNotRunning() bool
- func (it ExitCode) IsSuccess() bool
- func (it ExitCode) IsUndefined() bool
- func (it ExitCode) IsUnknownService() bool
- func (it ExitCode) MarshalJSON() ([]byte, error)
- func (it ExitCode) MaxByte() byte
- func (it ExitCode) MinByte() byte
- func (it ExitCode) Name() string
- func (it ExitCode) NameValue() string
- func (it ExitCode) RangeNamesCsv() string
- func (it ExitCode) RangesByte() []byte
- func (it ExitCode) String() string
- func (it ExitCode) ToByteEnumString(input byte) string
- func (it ExitCode) ToNumberString() string
- func (it ExitCode) TypeName() string
- func (it *ExitCode) UnmarshalJSON(data []byte) error
- func (it ExitCode) UnmarshallEnumToValue(jsonUnmarshallingValue []byte) (byte, error)
- func (it ExitCode) Value() byte
- func (it ExitCode) ValueByte() byte
Constants ¶
View Source
const (
InvalidExitCode = constants.MinInt
)
Variables ¶
View Source
var ( Ranges = [...]byte{ Undefined: Undefined.ValueByte(), ActiveRunning: ActiveRunning.ValueByte(), DeadButPidExists: DeadButPidExists.ValueByte(), DeadButVarLockFileExists: DeadButVarLockFileExists.ValueByte(), NotRunning: NotRunning.ValueByte(), UnknownService: UnknownService.ValueByte(), InvalidService: InvalidService.ValueByte(), InvalidCode: InvalidCode.ValueByte(), } StringRanges = [...]string{ Undefined: "Undefined", ActiveRunning: "ActiveRunning", DeadButPidExists: "DeadButPidExists", DeadButVarLockFileExists: "DeadButVarLockFileExists", NotRunning: "NotRunning", UnknownService: "UnknownService", InvalidService: "InvalidService", InvalidCode: "InvalidCode", } // RawMapping // // Reference : // https://gitlab.com/evatix-go/os-manuals/uploads/a3fc906f4ea29a59ebf29490391d0f86/image.png // https://t.ly/3jkY RawMapping = [...]ExitCode{ 0: ActiveRunning, 1: DeadButPidExists, 2: DeadButVarLockFileExists, 3: NotRunning, 4: UnknownService, 5: UnknownService, } BasicEnumImpl = enumimpl.NewBasicByteUsingIndexedSlice( coredynamic.TypeName(ActiveRunning), StringRanges[:]) )
Functions ¶
func RangesInvalidErr ¶
func RangesInvalidErr() error
Types ¶
type ExitCode ¶
type ExitCode byte
ExitCode
ActiveRunning, DeadButPidExists,
DeadButVarLockFileExists, NotRunning,
UnknownService
What code means?
- Undefined (0):
Created by us, actually its value 0
but here we are considered for parsing issue
- ActiveRunning(1):
We will map this to 0,
consider as program is running and service is okay.
- DeadButPidExists(2):
We will map this to 1,
consider as program is dead and /var/run pid exists.
- DeadButVarLockFileExists(3):
We will map this to 2,
consider as program is dead and /var/lock-lock file exists.
- NotRunning(4):
We will map this to 3,
consider as program is not running but service exists in the system.
- UnknownService(5) / InvalidService(7):
We will map this to 4, 5 respectively and
consider as program doesn't exist in the system or invalid exited.
Reference :
- LSB Returns Codes Screenshot : https://t.ly/3jkY
- LSB Returns Codes Screenshot : https://prnt.sc/26gunol
- Mapping (RawMapping) : https://prnt.sc/26gwnxw
func NewCodeMapping ¶
NewCodeMapping (using RawMapping)
Reference : https://gitlab.com/evatix-go/os-manuals/uploads/a3fc906f4ea29a59ebf29490391d0f86/image.png https://t.ly/3jkY
func (*ExitCode) AsBasicByteEnumContractsBinder ¶
func (it *ExitCode) AsBasicByteEnumContractsBinder() coreinterface.BasicByteEnumContractsBinder
func (*ExitCode) AsBasicByteEnumContractsDelegateBinder ¶
func (it *ExitCode) AsBasicByteEnumContractsDelegateBinder() coreinterface.BasicByteEnumContractsDelegateBinder
func (*ExitCode) AsBasicEnumContractsBinder ¶
func (it *ExitCode) AsBasicEnumContractsBinder() coreinterface.BasicEnumContractsBinder
func (*ExitCode) AsJsonMarshaller ¶
func (it *ExitCode) AsJsonMarshaller() corejson.JsonMarshaller
func (ExitCode) IsActiveRunning ¶
func (ExitCode) IsAnyOfExitCode ¶
func (ExitCode) IsDeadButPidExists ¶
func (ExitCode) IsDeadButVarLockFileExists ¶
func (ExitCode) IsInvalidCode ¶
func (ExitCode) IsInvalidService ¶
func (ExitCode) IsNotRunning ¶
func (ExitCode) IsUndefined ¶
func (ExitCode) IsUnknownService ¶
func (ExitCode) MarshalJSON ¶
func (ExitCode) RangeNamesCsv ¶
func (ExitCode) RangesByte ¶
func (ExitCode) ToByteEnumString ¶
func (ExitCode) ToNumberString ¶
func (*ExitCode) UnmarshalJSON ¶
func (ExitCode) UnmarshallEnumToValue ¶
Click to show internal directories.
Click to hide internal directories.