File tree 1 file changed +17
-0
lines changed
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;
14
14
15
15
const STANDBY_STATUS_UPDATE_TAG : u8 = b'r' ;
16
16
const HOT_STANDBY_FEEDBACK_TAG : u8 = b'h' ;
17
+ const ZENITH_STATUS_UPDATE_TAG_BYTE : u8 = b'z' ;
17
18
18
19
pin_project ! {
19
20
/// A type which deserializes the postgres replication protocol. This type can be used with
@@ -33,6 +34,22 @@ impl ReplicationStream {
33
34
Self { stream }
34
35
}
35
36
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
+
36
53
/// Send standby update to server.
37
54
pub async fn standby_status_update (
38
55
self : Pin < & mut Self > ,
You can’t perform that action at this time.
0 commit comments