# Packages
No description provided by the author
# Functions
CheckErr to handle command errors.
CheckFalsy checks for non-truthiness of the passed argument.
No description provided by the author
CheckTruthy checks for truthiness of the passed argument.
ContainKeys returns true if all the provided keys are present in the provided map.
ContainsKey returns true if the provided key is present in the provided map.
ContainsString returns true if the provided element is present in the provided array.
DeleteNestedField deletes a nested field from the provided map.
Fatal prints the message (if provided) and then exits.
FormatKV takes a set of strings and formats them into properly aligned k = v pairs using the columnize library.
FormatList takes a set of strings and formats them into properly aligned output, replacing any blank fields with a placeholder for awk-ability.
FormatListWithSpaces takes a set of strings and formats them into properly aligned output.
FormatTime formats the time to string based on RFC822.
FormatTimeDifference takes two times and determines their duration difference truncating to a passed unit.
FormatUnixNanoTime is a helper for formatting time for output.
GetEnv fetches the provided environment variable's value.
GetMapOfStrings gets the direct value from the passed obj & the field path The value returned should be expected of the form map[string]string.
GetNamespace gets the namespace OPENEBS_NAMESPACE env value which is set by the downward API where CVC-Operator has been deployed.
GetNestedArray returns an nested array from the provided map.
GetNestedField returns a nested field from the provided map.
GetNestedFieldInto converts a nested field to requested type from the provided map.
GetNestedInt64 returns an nested int64 from the provided map.
GetNestedInt64Pointer returns a nested int64 pointer from the provided map.
GetNestedMap returns a nested map from the provided map.
GetNestedSlice returns a nested slice from the provided map.
GetNestedString returns a nested string from the provided map.
GetOpenebsBaseDirPath returns the base path to store openebs related files on host machine.
GetServiceAccountName gets the name of OPENEBS_SERVICEACCOUNT_NAME env value which is set by the downward API of cvc and cspc operator deployments.
Hash constructs the hash value for any type of object.
IsChangeInLists returns true if there is any difference in listA and listB.
IsResponseEOD will detect if the data coming from UNIX pipe is completely received.
ListDiff returns list of string which are in listA but not in listB.
ListIntersection returns list of string which are in listA and listB.
LookupOrFalse looks up an environment variable and returns a string "false" if environment variable is not present.
MergeMapOfObjects will merge the map from src to dest.
MergeMapOfStrings will merge the map from src to dest.
MergeMaps merges maps and returns the resulting map.
NewLineLimitReader takes the ReadCloser to wrap, the number of lines to find searching backwards in the first searchLimit bytes.
Reader reads the response from unix domain socket.
RemoveString removes all occurrences of a string from slice and returns a new updated slice.
SetNestedField sets a nested field into the provided map.
SetNestedMap sets a nested map from the provided map.
SetNestedSlice sets a nested slice from the provided map.
StringToInt32 converts a string type to corresponding *int32 type.
StrToInt32 converts a string type to corresponding *int32 type
NOTE: This swallows the error if any.
Writer writes a command to unix domain socket.
# Constants
DefaultOpenEBSServiceAccount name of the default openebs service accout with required permissions.
IstgtUctlUnxpath is the storage path for the UNIX domain socket from istgt.
No description provided by the author
No description provided by the author
No description provided by the author
IstgtUctlUnxpath is the storage path for the UNIX domain socket from istgt.
No description provided by the author
No description provided by the author
IstgtResizeCmd holds the command to trigger resize.
No description provided by the author
IstgtUctlUnxpath is the storage path for the UNIX domain socket from istgt.
Namespace is the environment variable to get openebs namespace
This environment variable is set via kubernetes downward API.
OpenEBSBaseDir is the environment variable to get base directory of openebs.
OpenEBSNamespace is the environment variable to get openebs namespace
This environment variable is set via kubernetes downward API.
OpenEBSServiceAccount is the environment variable to get operator service account name
This environment variable is set via kubernetes downward API in cvc and cspc operators deployments.
No description provided by the author
No description provided by the author
# Variables
ErrInternalServerError is the new error to raise if an error occurs while rendering the service.
ErrMAPIADDRNotSet is the new error to display this error if MAPI_ADDR is not set.
ErrPageNotFound is the new error to raise if the page is not found.
ErrServerNotReachable is the new error to raise if the server is not reachable.
ErrServerUnavailable is the new error to raise if the server is not available.
# Structs
LineLimitReader wraps another reader and provides `tail -n` like behavior.
RealFileOperator is used for writing the actual files without mocking.
RealRunner is the real runner for the program that actually execs the command.
RealUnixSock is used for sending data through real unix domain sockets.
TestFileOperator is used as a dummy FileOperator.
TestRunner is used as a dummy Runner.
TestUnixSock is used as a dummy UnixSock.
# Interfaces
FileOperator operates on files.
Runner interface implements various methods of running binaries which can be modified for unit testing.
UnixSock operates on unix domain sockets.