modulepackage
1.4.1
Repository: https://github.com/adevinta/vulcan-check-sdk.git
Documentation: pkg.go.dev
# README
Vulcan Check SDK
This SDK is used by Vulcan checks to track their progress, process targets, report results and communicate their status with the agent. It also provides some helper packages that may be used in multiple checks.
# Functions
NewCheck creates a check given a Checker.
NewCheckFromHandler creates a new check given a checker run handler.
NewCheckFromHandlerWithCleanUp creates a new check given a checker run handler.
NewCheckFromHandlerWithConfig creates a new check from run and abort handlers using provided config.
NewCheckLog creates a log suitable to be used by a check.
NewCheckLogFromContext retrieves the logger from the context or creates a new one.
NewProcessChecker creates a new ProcessChecker that launch a process and optionally process the standard output spliting it in chunks defined by a custom bufio.SplitFunc.
WaitForFile waits for a file to be created.
# Variables
VoidCheckerCleanUp defines a clean up function that does nothing this is usefull for checks that don't need to do any cleanup when the check finalizes.
# Structs
ProcessCheck simplifies developing a check that runs a process.
# Interfaces
Check defines a check as seen by a checker, that is a concrete check implementor.
Checker defines the shape a checker must have in order to be executed as vulcan-check.
ProcessChecker Declares the method a checker must implement in order to use processChecker.
ProcessCheckRunner defines interface a check must implement in order to use the process helper.
# Type aliases
CheckerHandleCleanUp func type to specify a CleanUp handler function for a checker.
CheckerHandleRun func type to specify a Run handler function for a checker.
ProcessCheckerProcessOutputHandler handy adapter to specify a ProcessFinished method deifined in the ProcessChecker interface using a function.