File tree Expand file tree Collapse file tree 2 files changed +58
-0
lines changed
Expand file tree Collapse file tree 2 files changed +58
-0
lines changed Original file line number Diff line number Diff line change @@ -60,3 +60,4 @@ pub trait Monitor: Shutdownable {
6060
6161mod cloudflare;
6262mod cloudwatch;
63+ mod vercel;
Original file line number Diff line number Diff line change 1+ #![ allow( dead_code) ]
2+ // This code won't be dead once we incorporate it into the flow.
3+
4+ use async_trait:: async_trait;
5+ use derive_getters:: Getters ;
6+
7+ use crate :: {
8+ Shutdownable , adapters:: backend:: MonitorConfig , metrics:: ResponseStatusCode ,
9+ stats:: CategoricalObservation , subsystems:: ShutdownResult ,
10+ } ;
11+ use miette:: Result ;
12+
13+ use super :: Monitor ;
14+
15+ type VercelClient = ( ) ;
16+
17+ #[ derive( Getters ) ]
18+ pub struct Vercel {
19+ client : VercelClient ,
20+ }
21+
22+ impl Vercel {
23+ pub fn new ( client : VercelClient ) -> Self {
24+ Self { client }
25+ }
26+ }
27+
28+ #[ async_trait]
29+ impl Monitor for Vercel {
30+ type Item = CategoricalObservation < 5 , ResponseStatusCode > ;
31+
32+ fn get_config ( & self ) -> MonitorConfig {
33+ todo ! ( ) ;
34+ }
35+
36+ async fn query ( & mut self ) -> Result < Vec < Self :: Item > > {
37+ todo ! ( ) ;
38+ }
39+
40+ async fn set_canary_version_id ( & mut self , canary_version_id : String ) -> Result < ( ) > {
41+ let _ = canary_version_id;
42+ todo ! ( ) ;
43+ }
44+
45+ // TODO: standardize naming to baseline when working outside of statistics packages
46+ async fn set_baseline_version_id ( & mut self , baseline_version_id : String ) -> Result < ( ) > {
47+ let _ = baseline_version_id;
48+ todo ! ( ) ;
49+ }
50+ }
51+
52+ #[ async_trait]
53+ impl Shutdownable for Vercel {
54+ async fn shutdown ( & mut self ) -> ShutdownResult {
55+ todo ! ( ) ;
56+ }
57+ }
You can’t perform that action at this time.
0 commit comments