Class StreamRecordExtensions
Extension utility methods for the beta streamrecords resource.
Inherited Members
Namespace: Cognite.Extensions
Assembly: Cognite.Extensions.dll
Syntax
public static class StreamRecordExtensions
Methods
| Edit this page View SourceGetOrCreateStreamAsync(StreamRecordsResource, StreamWrite, CancellationToken)
Retrieve a stream, or create it if it does not exist.
Declaration
public static Task<Stream> GetOrCreateStreamAsync(this StreamRecordsResource streams, StreamWrite stream, CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
StreamRecordsResource | streams | Stream resource |
StreamWrite | stream | Stream to create |
CancellationToken | token | Cancellation token |
Returns
Type | Description |
---|---|
Task<Stream> | Created or retrieved stream. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
InsertRecordsAsync(StreamRecordsResource, string, ICollection<StreamRecordWrite>, int, int, CancellationToken)
Insert the given stream records into stream
. The stream
must exist.
Declaration
public static Task InsertRecordsAsync(this StreamRecordsResource streams, string stream, ICollection<StreamRecordWrite> records, int chunkSize, int throttleSize, CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
StreamRecordsResource | streams | Stream resource |
string | stream | Stream to ingest into |
ICollection<StreamRecordWrite> | records | Stream records to insert |
int | chunkSize | Maximum number of records per request |
int | throttleSize | Maximum number of parallel requests |
CancellationToken | token | Cancellation token |
Returns
Type | Description |
---|---|
Task |