Codebase
Navigate the Codebase using the tree view. Use the filters to highlight where various files are grouped to aid understanding.
Getting Started Commands
Project Structure
Below is a short description of the key directories of the project to aid you when understanding where key files are located.
.vscode/ - This directory contains settings specific to Visual Studio Code (VSCode) for developing the Slim project. The launch.json file is used to configure the debugger in VSCode.
assets/ - This directory holds static files used by the Slim project, such as images. The subdirectories cncf/, dhd/, and dslim/ likely contain images related to specific components or brands.
build/ - This directory contains the build files for the Slim project. The package/ subdirectory within build/ contains various packages used during the build process.
cmd/ - This directory contains the command-line interface (CLI) tools for the Slim project. The slim/ and slim-sensor/ subdirectories contain the main executables for the Slim and Slim Sensor tools, respectively.
examples/ - This directory contains example projects that demonstrate how to use the Slim project. The k8s_nginx_cgr/ subdirectory may be an example of deploying Nginx with Container Resource Limits (cGroup) using Slim.
pkg/ - This directory contains the Go packages for the Slim project. Various subdirectories, such as acounter/, app/, appbom/, artifact/, certdiscover/, command/, consts/, docker/, errors/, imagebuilder/, imagereader/, ipc/, lambdaproxy/, launcher/, mondel/, monitor/, pdiscover/, report/, sysenv/, sysidentity/, system/, and util/, contain different packages used throughout the project.
scripts/ - This directory contains scripts used during the development and build process of the Slim project. The mac/ subdirectory contains scripts specific to macOS.
test/ - This directory contains test files for the Slim project. The bats/ subdirectory contains test files using the Bats testing framework.
Entrypoints
Below are files we identified as entrypoints for to the codebase. This is where the application starts and a good place to start when learning.
cmd/slim-sensor/main.go - The entrypoint for the Slim sensor, a separate component that monitors the system for new Go binaries.
cmd/slim/main.go - The entrypoint for the Slim command-line interface application.
pkg/appbom/gobinhasher.go - A utility package for hashing Go binaries. The entrypoint of this file initializes the application and provides functions to get the full path of Go executables and hash files.