Documentation
¶
Overview ¶
Package requirements collects a few implementations of the v1.Requirement interface. This is a simple strcut that helps decomposers express and check what they need to extract dependency data.
## Interface and Methods
The interface is really simple:
```golang
type Requirement interface {
Description() string
Check() bool
}
```
Any implementation needs to expose two methods:
### Description()
This function returns human readable text to expose to users in CLIs, etc ¶
### Check()
Check returns a boolean that indicates if the requirement is met.
## Available Implementations
- Network is a requirements implementation that checks for network connectivity to a specific host.
- Executable looks for an executable in the system.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executable ¶
type Executable struct {
Command string
}
func (*Executable) Check ¶
func (er *Executable) Check() bool
Check verifies the binaries can be run
func (*Executable) Description ¶
func (er *Executable) Description() string
type Network ¶
Network is a requirements implementation that checks that the runtime is able to connect to a specific host and port.