Skip to content

Commit bb65af6

Browse files
committed
Move Stream interface documentation to top
1 parent b5ebfb7 commit bb65af6

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,19 @@ Invoking this lambda will yield the following:
109109

110110
![Streaming in Terminal](https://github.com/xp-forge/lambda/assets/696742/41785beb-3903-45a0-a2ec-2c7c27c2c7b4)
111111

112+
The *Stream* interface is defined as follows:
113+
114+
```php
115+
public interface com.amazon.aws.lambda.Stream extends io.streams.OutputStream, lang.Closeable {
116+
public function transmit(io.Channel|io.streams.InputStream $source, string $mimeType): void
117+
public function use(string $mimeType): void
118+
public function write(string $bytes): void
119+
public function end(): void
120+
public function flush(): void
121+
public function close(): var
122+
}
123+
```
124+
112125
Development
113126
-----------
114127
To run your lambda locally, use the following:
@@ -327,15 +340,6 @@ public interface com.amazon.aws.lambda.Streaming {
327340
com.amazon.aws.lambda.Context $context
328341
): void
329342
}
330-
331-
public interface com.amazon.aws.lambda.Stream extends io.streams.OutputStream, lang.Closeable {
332-
public function transmit(io.Channel|io.streams.InputStream $source, string $mimeType): void
333-
public function use(string $mimeType): void
334-
public function write(string $bytes): void
335-
public function end(): void
336-
public function flush(): void
337-
public function close(): var
338-
}
339343
```
340344

341345
See also

0 commit comments

Comments
 (0)