@@ -107,8 +107,7 @@ pub struct EventContext {
107
107
pub identity : Option < CognitoIdentity > ,
108
108
}
109
109
110
- /// The client SDK for Lambda's Runtime APIs that implements the `RuntimeClient` trait.
111
- /// This object is used by the `RustRuntime` to communicate with the internal endpoint.
110
+ /// Used by the Runtime to communicate with the internal endpoint.
112
111
pub struct RuntimeClient {
113
112
_runtime : Runtime ,
114
113
http_client : Client < HttpConnector , Body > ,
@@ -117,15 +116,7 @@ pub struct RuntimeClient {
117
116
118
117
impl RuntimeClient {
119
118
/// Creates a new instance of the Runtime APIclient SDK. The http client has timeouts disabled and
120
- /// always send the `Connection: keep-alive` header.
121
- ///
122
- /// # Arguments
123
- ///
124
- /// * `http_endpoint` The http endpoint for the Runtime APIs. This value comes from the AWS_LAMBDA_RUNTIME_API
125
- /// environment variable.
126
- ///
127
- /// # Return
128
- /// An instance of the Runtime APIs client SDK.
119
+ /// will always send a `Connection: keep-alive` header.
129
120
pub fn new ( endpoint : String , runtime : Option < Runtime > ) -> Result < Self , ApiError > {
130
121
debug ! ( "Starting new HttpRuntimeClient for {}" , endpoint) ;
131
122
// start a tokio core main event loop for hyper
@@ -145,10 +136,7 @@ impl RuntimeClient {
145
136
}
146
137
147
138
impl RuntimeClient {
148
- /// Makes the HTTP call to poll for new events to the Runtime APIs.
149
- ///
150
- /// # Return
151
- /// A `Result` containing a tuple of the new event of type `E` and its `EventContext`.
139
+ /// Polls for new events to the Runtime APIs.
152
140
pub fn next_event ( & self ) -> Result < ( Vec < u8 > , EventContext ) , ApiError > {
153
141
let uri = format ! (
154
142
"http://{}/{}/runtime/invocation/next" ,
0 commit comments