diff options
| author | Jeff Carr <[email protected]> | 2024-12-17 00:00:49 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-17 00:00:49 -0600 |
| commit | c53da5a9a1da1b29db24d4e1ce2b294514d99ac2 (patch) | |
| tree | c39b33f43d5be87313b3c0aa0c7bb7c58b2f72b6 /repo.proto | |
| parent | a115ba144b00dc0339a8cf7eae6bdf2aab5fb4b5 (diff) | |
smarter and faster mtime logic
Diffstat (limited to 'repo.proto')
| -rw-r--r-- | repo.proto | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -34,6 +34,11 @@ message Repo { // `autogenpb:marshal` string desc = 20; // what is this repo? bytes goMod = 21; // the last go.mod file bytes goSum = 22; // the last go.sum file + google.protobuf.Timestamp mtimeGitDir = 23; // mtime for ./git + google.protobuf.Timestamp mtimeGitHead = 24; // mtime for ./git/HEAD // these two mtimes allow really fast checks to see if git has changed + GitTimes times = 25; // store all the mtime values here. these are temporary + GoInfo goInfo = 26; // put all the go specifcs here + string stateChange = 27; // reason for state change } message Repos { // `autogenpb:marshal` @@ -41,3 +46,29 @@ message Repos { // `autogenpb:marshal` string version = 2; // maybe can be used for protobuf schema change violations repeated Repo repos = 3; } + +// should it be done this way? +message GitTimes { + google.protobuf.Timestamp lastPull = 1; // last time a git pull was done + google.protobuf.Timestamp lastUpdate = 2; // when was ReloadGit() last done + google.protobuf.Timestamp lastDirty = 3; // last time CheckDirty() was run + google.protobuf.Timestamp mtimeDir = 4; // mtime for ./git // maybe useful to track + google.protobuf.Timestamp mtimeHead = 5; // mtime for ./git/HEAD // these two mtimes allow really fast checks to see if git has changed + google.protobuf.Timestamp mtimeIndex = 6; // mtime for ./git/HEAD // probably always in sync with HEAD + google.protobuf.Timestamp mtimeFetch = 7; // mtime for ./git/FETCH_HEAD // last time 'git fetch' or 'git pull' was run on current branch? +} + +// this is probably better. think about moving to this instead +message GoInfo { + string goPath = 1; // the logical path as used by golang: 'go.wit.com/apps/helloworld' + string desc = 2; // what is this repo? + bool goLibrary = 3; // is this a golang library? + bool goBinary = 4; // is this a golang binary? + bool goPrimitive = 5; // if this is a golang primitive (only has go.mod) + bool goPlugin = 6; // is this a golang plugin? + bool goProtobuf = 7; // autogen go files from .proto + GoDeps goDeps = 8; // what is in the go.sum file + GoDeps published = 9; // the last published go.mod/go.sum + bytes goMod = 10; // the last go.mod file + bytes goSum = 11; // the last go.sum file +} |
