github.com/mutagen-io/mutagen@v0.18.0-rc1/pkg/synchronization/state.proto (about) 1 syntax = "proto3"; 2 3 package synchronization; 4 5 option go_package = "github.com/mutagen-io/mutagen/pkg/synchronization"; 6 7 import "synchronization/rsync/receive.proto"; 8 import "synchronization/session.proto"; 9 import "synchronization/core/conflict.proto"; 10 import "synchronization/core/problem.proto"; 11 12 // Status encodes the status of a synchronization session. 13 enum Status { 14 // Status_Disconnected indicates that the session is unpaused but not 15 // currently connected or connecting to either endpoint. 16 Disconnected = 0; 17 // Status_HaltedOnRootEmptied indicates that the session is halted due to 18 // the root emptying safety check. 19 HaltedOnRootEmptied = 1; 20 // Status_HaltedOnRootDeletion indicates that the session is halted due to 21 // the root deletion safety check. 22 HaltedOnRootDeletion = 2; 23 // Status_HaltedOnRootTypeChange indicates that the session is halted due to 24 // the root type change safety check. 25 HaltedOnRootTypeChange = 3; 26 // Status_ConnectingAlpha indicates that the session is attempting to 27 // connect to the alpha endpoint. 28 ConnectingAlpha = 4; 29 // Status_ConnectingBeta indicates that the session is attempting to connect 30 // to the beta endpoint. 31 ConnectingBeta = 5; 32 // Status_Watching indicates that the session is watching for filesystem 33 // changes. 34 Watching = 6; 35 // Status_Scanning indicates that the session is scanning the filesystem on 36 // each endpoint. 37 Scanning = 7; 38 // Status_WaitingForRescan indicates that the session is waiting to retry 39 // scanning after an error during the previous scanning operation. 40 WaitingForRescan = 8; 41 // Status_Reconciling indicates that the session is performing 42 // reconciliation. 43 Reconciling = 9; 44 // Status_StagingAlpha indicates that the session is staging files on alpha. 45 StagingAlpha = 10; 46 // Status_StagingBeta indicates that the session is staging files on beta. 47 StagingBeta = 11; 48 // Status_Transitioning indicates that the session is performing transition 49 // operations on each endpoint. 50 Transitioning = 12; 51 // Status_Saving indicates that the session is recording synchronization 52 // history to disk. 53 Saving = 13; 54 } 55 56 // EndpointState encodes the current state of a synchronization endpoint. It is 57 // mutable within the context of the daemon, so it should be accessed and 58 // modified in a synchronized fashion. Outside of the daemon (e.g. when returned 59 // via the API), it should be considered immutable. 60 message EndpointState { 61 // Connected indicates whether or not the controller is currently connected 62 // to the endpoint. 63 bool connected = 1; 64 // Scanned indicates whether or not at least one scan has been performed on 65 // the endpoint. 66 bool scanned = 2; 67 // Directories is the number of synchronizable directory entries contained 68 // in the last snapshot from the endpoint. 69 uint64 directories = 3; 70 // Files is the number of synchronizable file entries contained in the last 71 // snapshot from the endpoint. 72 uint64 files = 4; 73 // SymbolicLinks is the number of synchronizable symbolic link entries 74 // contained in the last snapshot from the endpoint. 75 uint64 symbolicLinks = 5; 76 // TotalFileSize is the total size of all synchronizable files referenced by 77 // the last snapshot from the endpoint. 78 uint64 totalFileSize = 6; 79 // ScanProblems is the list of non-terminal problems encountered during the 80 // last scanning operation on the endpoint. This list may be a truncated 81 // version of the full list if too many problems are encountered to report 82 // via the API, in which case ExcludedScanProblems will be non-zero. 83 repeated core.Problem scanProblems = 7; 84 // ExcludedScanProblems is the number of problems that have been excluded 85 // from ScanProblems due to truncation. This value can be non-zero only if 86 // ScanProblems is non-empty. 87 uint64 excludedScanProblems = 8; 88 // TransitionProblems is the list of non-terminal problems encountered 89 // during the last transition operation on the endpoint. This list may be a 90 // truncated version of the full list if too many problems are encountered 91 // to report via the API, in which case ExcludedTransitionProblems will be 92 // non-zero. 93 repeated core.Problem transitionProblems = 9; 94 // ExcludedTransitionProblems is the number of problems that have been 95 // excluded from TransitionProblems due to truncation. This value can be 96 // non-zero only if TransitionProblems is non-empty. 97 uint64 excludedTransitionProblems = 10; 98 // StagingProgress is the rsync staging progress. It is non-nil if and only 99 // if the endpoint is currently staging files. 100 rsync.ReceiverState stagingProgress = 11; 101 } 102 103 // State encodes the current state of a synchronization session. It is mutable 104 // within the context of the daemon, so it should be accessed and modified in a 105 // synchronized fashion. Outside of the daemon (e.g. when returned via the API), 106 // it should be considered immutable. 107 message State { 108 // Session is the session metadata. If the session is paused, then the 109 // remainder of the fields in this structure should be ignored. 110 Session session = 1; 111 // Status is the session status. 112 Status status = 2; 113 // LastError is the last error to occur during synchronization. It is 114 // cleared after a successful synchronization cycle. 115 string lastError = 3; 116 // SuccessfulCycles is the number of successful synchronization cycles to 117 // occur since successfully connecting to the endpoints. 118 uint64 successfulCycles = 4; 119 // Conflicts are the content conflicts identified during reconciliation. 120 // This list may be a truncated version of the full list if too many 121 // conflicts are encountered to report via the API, in which case 122 // ExcludedConflicts will be non-zero. 123 repeated core.Conflict conflicts = 5; 124 // ExcludedConflicts is the number of conflicts that have been excluded from 125 // Conflicts due to truncation. This value can be non-zero only if conflicts 126 // is non-empty. 127 uint64 excludedConflicts = 6; 128 // AlphaState encodes the state of the alpha endpoint. It is always non-nil. 129 EndpointState alphaState = 7; 130 // BetaState encodes the state of the beta endpoint. It is always non-nil. 131 EndpointState betaState = 8; 132 }