github.com/mutagen-io/mutagen@v0.18.0-rc1/pkg/service/synchronization/synchronization.proto (about) 1 syntax = "proto3"; 2 3 package synchronization; 4 5 option go_package = "github.com/mutagen-io/mutagen/pkg/service/synchronization"; 6 7 import "selection/selection.proto"; 8 import "synchronization/configuration.proto"; 9 import "synchronization/state.proto"; 10 import "url/url.proto"; 11 12 // CreationSpecification contains the metadata required for a new session. 13 message CreationSpecification { 14 // Alpha is the alpha endpoint URL for the session. 15 url.URL alpha = 1; 16 // Beta is the beta endpoint URL for the session. 17 url.URL beta = 2; 18 // Configuration is the base session configuration. It is the result of 19 // merging the global configuration (unless disabled), any manually 20 // specified configuration file, and any command line configuration 21 // parameters. 22 synchronization.Configuration configuration = 3; 23 // ConfigurationAlpha is the alpha-specific session configuration. It is 24 // determined based on command line configuration parameters. 25 synchronization.Configuration configurationAlpha = 4; 26 // ConfigurationBeta is the beta-specific session configuration. It is 27 // determined based on command line configuration parameters. 28 synchronization.Configuration configurationBeta = 5; 29 // Name is the name for the session object. 30 string name = 6; 31 // Labels are the labels for the session object. 32 map<string, string> labels = 7; 33 // Paused indicates whether or not to create the session pre-paused. 34 bool paused = 8; 35 } 36 37 // CreateRequest encodes a request for session creation. 38 message CreateRequest { 39 // Prompter is the prompter identifier to use for creating sessions. 40 string prompter = 1; 41 // Specification is the creation specification. 42 CreationSpecification specification = 2; 43 } 44 45 // CreateResponse encodes a session creation response. 46 message CreateResponse { 47 // Session is the resulting session identifier. 48 string session = 1; 49 } 50 51 // ListRequest encodes a request for session metadata. 52 message ListRequest { 53 // Selection is the session selection criteria. 54 selection.Selection selection = 1; 55 // PreviousStateIndex is the previously seen state index. 0 may be provided 56 // to force an immediate state listing. 57 uint64 previousStateIndex = 2; 58 } 59 60 // ListResponse encodes session metadata. 61 message ListResponse { 62 // StateIndex is the state index associated with the session metadata. 63 uint64 stateIndex = 1; 64 // SessionStates are the session metadata states. 65 repeated synchronization.State sessionStates = 2; 66 } 67 68 // FlushRequest encodes a request to flush sessions. 69 message FlushRequest { 70 // Prompter is the prompter to use for status message updates. 71 string prompter = 1; 72 // Selection is the session selection criteria. 73 selection.Selection selection = 2; 74 // SkipWait indicates whether or not the operation should avoid blocking. 75 bool skipWait = 3; 76 } 77 78 // FlushResponse indicates completion of flush operation(s). 79 message FlushResponse{} 80 81 // PauseRequest encodes a request to pause sessions. 82 message PauseRequest { 83 // Prompter is the prompter to use for status message updates. 84 string prompter = 1; 85 // Selection is the session selection criteria. 86 selection.Selection selection = 2; 87 } 88 89 // PauseResponse indicates completion of pause operation(s). 90 message PauseResponse{} 91 92 // ResumeRequest encodes a request to resume sessions. 93 message ResumeRequest { 94 // Prompter is the prompter identifier to use for resuming sessions. 95 string prompter = 1; 96 // Selection is the session selection criteria. 97 selection.Selection selection = 2; 98 } 99 100 // ResumeResponse indicates completion of resume operation(s). 101 message ResumeResponse{} 102 103 // ResetRequest encodes a request to reset sessions. 104 message ResetRequest { 105 // Prompter is the prompter identifier to use for resetting sessions. 106 string prompter = 1; 107 // Selection is the session selection criteria. 108 selection.Selection selection = 2; 109 } 110 111 // ResetResponse indicates completion of reset operation(s). 112 message ResetResponse{} 113 114 // TerminateRequest encodes a request to terminate sessions. 115 message TerminateRequest { 116 // Prompter is the prompter to use for status message updates. 117 string prompter = 1; 118 // Selection is the session selection criteria. 119 selection.Selection selection = 2; 120 } 121 122 // TerminateResponse indicates completion of termination operation(s). 123 message TerminateResponse{} 124 125 // Synchronization manages the lifecycle of synchronization sessions. 126 service Synchronization { 127 // Create creates a new session. 128 rpc Create(CreateRequest) returns (CreateResponse) {} 129 // List returns metadata for existing sessions. 130 rpc List(ListRequest) returns (ListResponse) {} 131 // Flush flushes sessions. 132 rpc Flush(FlushRequest) returns (FlushResponse) {} 133 // Pause pauses sessions. 134 rpc Pause(PauseRequest) returns (PauseResponse) {} 135 // Resume resumes paused or disconnected sessions. 136 rpc Resume(ResumeRequest) returns (ResumeResponse) {} 137 // Reset resets sessions' histories. 138 rpc Reset(ResetRequest) returns (ResetResponse) {} 139 // Terminate terminates sessions. 140 rpc Terminate(TerminateRequest) returns (TerminateResponse) {} 141 }