github.com/mutagen-io/mutagen@v0.18.0-rc1/pkg/forwarding/state.proto (about) 1 syntax = "proto3"; 2 3 package forwarding; 4 5 option go_package = "github.com/mutagen-io/mutagen/pkg/forwarding"; 6 7 import "forwarding/session.proto"; 8 9 // Status encodes the status of a forwarding session. 10 enum Status { 11 // Status_Disconnected indicates that the session is disconnected. 12 Disconnected = 0; 13 // Status_ConnectingSource indicates that the session is in the process of 14 // connecting to the source endpoint. 15 ConnectingSource = 1; 16 // Status_ConnectingDestination indicates that the session is in the process 17 // of connecting to the destination endpoint. 18 ConnectingDestination = 2; 19 // Status_ForwardingConnections indicates that the session is connected and 20 // currently forwarding connections. 21 ForwardingConnections = 3; 22 } 23 24 // EndpointState encodes the current state of a forwarding endpoint. It is 25 // mutable within the context of the daemon, so it should be accessed and 26 // modified in a synchronized fashion. Outside of the daemon (e.g. when returned 27 // via the API), it should be considered immutable. 28 message EndpointState { 29 // Connected indicates whether or not the controller is currently connected 30 // to the endpoint. 31 bool connected = 1; 32 } 33 34 // State encodes the current state of a forwarding session. It is mutable within 35 // the context of the daemon, so it should be accessed and modified in a 36 // synchronized fashion. Outside of the daemon (e.g. when returned via the API), 37 // it should be considered immutable. 38 message State { 39 // Session is the session specification. 40 Session session = 1; 41 // Status is the status of the session. 42 Status status = 2; 43 // LastError indicates the last error that occurred during forwarding. 44 string lastError = 3; 45 // OpenConnections is the number of connections currently open and being 46 // forwarded. 47 uint64 openConnections = 4; 48 // TotalConnections is the number of total connections that have been opened 49 // and forwarded (including those that are currently open). 50 uint64 totalConnections = 5; 51 // TotalOutboundData is the total amount of data (in bytes) that has been 52 // transmitted from source to destination across all forwarded connections. 53 uint64 totalOutboundData = 6; 54 // TotalInboundData is the total amount of data (in bytes) that has been 55 // transmitted from destination to source across all forwarded connections. 56 uint64 totalInboundData = 7; 57 // SourceState encodes the state of the source endpoint. It is always 58 // non-nil. 59 EndpointState sourceState = 8; 60 // DestinationState encodes the state of the destination endpoint. It is 61 // always non-nil. 62 EndpointState destinationState = 9; 63 }