Documentation ¶
Overview ¶
Package git makes a git repository out of a local directory, keeps the content committed when the directory content changes, and optionaly (if a remote repos url is provided), keep it in sync with a remote repository.
It requires the git command in $PATH, since the pure Go git implementations aren't up to the task (see go-git issues #793 and #785 for instance).
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // TimeoutCommands defines the max execution time for git commands TimeoutCommands = 60 * time.Second // CheckInterval defines the interval between local directory checks CheckInterval = 10 * time.Second // GitAuthor is the name of the commiter GitAuthor = "Katafygio" // GitEmail is the email of the commiter GitEmail = "katafygio@localhost" // GitMsg is the commit message we'll use GitMsg = "Kubernetes cluster change" )
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct { Logger logger LocalDir string URL string Author string Email string Msg string DryRun bool // contains filtered or unexported fields }
Store will maintain a git repository off dumped kube objects
func (*Store) CloneOrInit ¶ added in v0.4.0
CloneOrInit create a new local repository, either with "git clone" (if a GitURL to clone from is provided), or "git init" (in the absence of GitURL).
Click to show internal directories.
Click to hide internal directories.