File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ use std::time::SystemTime;
1414
1515const STANDBY_STATUS_UPDATE_TAG : u8 = b'r' ;
1616const HOT_STANDBY_FEEDBACK_TAG : u8 = b'h' ;
17+ const ZENITH_STATUS_UPDATE_TAG_BYTE : u8 = b'z' ;
1718
1819pin_project ! {
1920 /// A type which deserializes the postgres replication protocol. This type can be used with
@@ -33,6 +34,22 @@ impl ReplicationStream {
3334 Self { stream }
3435 }
3536
37+ /// Send zenith status update to server.
38+ pub async fn zenith_status_update (
39+ self : Pin < & mut Self > ,
40+ len : u64 ,
41+ data : & [ u8 ] ,
42+ ) -> Result < ( ) , Error > {
43+ let mut this = self . project ( ) ;
44+
45+ let mut buf = BytesMut :: new ( ) ;
46+ buf. put_u8 ( ZENITH_STATUS_UPDATE_TAG_BYTE ) ;
47+ buf. put_u64 ( len) ;
48+ buf. put_slice ( data) ;
49+
50+ this. stream . send ( buf. freeze ( ) ) . await
51+ }
52+
3653 /// Send standby update to server.
3754 pub async fn standby_status_update (
3855 self : Pin < & mut Self > ,
You can’t perform that action at this time.
0 commit comments