@@ -27,14 +27,12 @@ use confidence_resolver::proto::confidence::flags::resolver::v1::{
2727use confidence_resolver:: Client ;
2828use once_cell:: sync:: Lazy ;
2929
30- /// SetResolverStateRequest message from the CDN.
31- /// This matches the protobuf message format returned by the CDN.
3230#[ derive( Clone , PartialEq , Message ) ]
33- pub struct SetResolverStateRequest {
31+ pub struct ClientResolverState {
3432 #[ prost( bytes = "bytes" , tag = "1" ) ]
3533 pub state : Bytes ,
3634 #[ prost( string, tag = "2" ) ]
37- pub account_id : String ,
35+ pub account : String ,
3836}
3937
4038/// The CDN response containing both the state and account_id
@@ -58,16 +56,16 @@ static FLAGS_LOGS_QUEUE: OnceLock<Queue> = OnceLock::new();
5856static CONFIDENCE_CLIENT_SECRET : OnceLock < String > = OnceLock :: new ( ) ;
5957
6058/// Parsed CDN state request containing both state and account_id
61- static CDN_STATE_REQUEST : Lazy < SetResolverStateRequest > = Lazy :: new ( || {
62- SetResolverStateRequest :: decode ( Bytes :: from_static ( CDN_STATE_BYTES ) )
63- . expect ( "Failed to decode SetResolverStateRequest from CDN state" )
59+ static CDN_STATE_REQUEST : Lazy < ClientResolverState > = Lazy :: new ( || {
60+ ClientResolverState :: decode ( Bytes :: from_static ( CDN_STATE_BYTES ) )
61+ . expect ( "Failed to decode ClientResolverState from CDN state" )
6462} ) ;
6563
6664static RESOLVER_STATE : Lazy < ResolverState > = Lazy :: new ( || {
6765 let cdn_request = & * CDN_STATE_REQUEST ;
6866 ResolverState :: from_proto (
6967 cdn_request. state . to_vec ( ) . try_into ( ) . unwrap ( ) ,
70- & cdn_request. account_id ,
68+ & cdn_request. account ,
7169 None ,
7270 )
7371 . unwrap ( )
0 commit comments