Skip to content

Commit

Permalink
quixio#24: Implement optional constructor parameters for QuixStreamin…
Browse files Browse the repository at this point in the history
…gClient (quixio#25)

24: Add optional optional constructor overloads

- Add WorkspaceId as optional configuration
- Add ApiUrl as optional configuration
  • Loading branch information
peter-quix authored Jan 19, 2024
1 parent 7daba8a commit 5a26e3a
Show file tree
Hide file tree
Showing 144 changed files with 1,565 additions and 162 deletions.
6 changes: 3 additions & 3 deletions builds/csharp/nuget/build_nugets.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import fileinput
from typing import List

version = "0.6.1.0"
informal_version = "0.6.1.0"
nuget_version = "0.6.1.0"
version = "0.6.2.0"
informal_version = "0.6.2.0-dev1"
nuget_version = "0.6.2.0-dev1"


def updatecsproj(projfilepath):
Expand Down
8 changes: 7 additions & 1 deletion docs/api-reference/IQuixStreamingClient.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@

## IQuixStreamingClient Interface

Represents a streaming client for Kafka configured automatically using Environment Variables and Quix platform endpoints.
Use this Client when you use this library together with Quix platform.

```csharp
public interface IQuixStreamingClient
public interface IQuixStreamingClient :
QuixStreams.Streaming.IQuixStreamingClientAsync
```

Derived
↳ [QuixStreamingClient](QuixStreamingClient.md 'QuixStreams.Streaming.QuixStreamingClient')

Implements [IQuixStreamingClientAsync](IQuixStreamingClientAsync.md 'QuixStreams.Streaming.IQuixStreamingClientAsync')

| Methods | |
| :--- | :--- |
| [GetRawTopicConsumer(string, string, Nullable&lt;AutoOffsetReset&gt;)](IQuixStreamingClient.GetRawTopicConsumer(string,string,Nullable_AutoOffsetReset_).md 'QuixStreams.Streaming.IQuixStreamingClient.GetRawTopicConsumer(string, string, System.Nullable<QuixStreams.Telemetry.Kafka.AutoOffsetReset>)') | Gets a topic consumer capable of subscribing to receive non-quixstreams incoming messages. |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#### [QuixStreams.Streaming](index.md 'index')
### [QuixStreams.Streaming](QuixStreams.Streaming.md 'QuixStreams.Streaming').[IQuixStreamingClientAsync](IQuixStreamingClientAsync.md 'QuixStreams.Streaming.IQuixStreamingClientAsync')

## IQuixStreamingClientAsync.GetRawTopicConsumerAsync(string, string, Nullable<AutoOffsetReset>) Method

Asynchronously gets a topic consumer capable of subscribing to receive non-quixstreams incoming messages.

```csharp
System.Threading.Tasks.Task<QuixStreams.Streaming.Raw.IRawTopicConsumer> GetRawTopicConsumerAsync(string topicIdOrName, string consumerGroup=null, System.Nullable<QuixStreams.Telemetry.Kafka.AutoOffsetReset> autoOffset=null);
```
#### Parameters

<a name='QuixStreams.Streaming.IQuixStreamingClientAsync.GetRawTopicConsumerAsync(string,string,System.Nullable_QuixStreams.Telemetry.Kafka.AutoOffsetReset_).topicIdOrName'></a>

`topicIdOrName` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String')

Id or name of the topic. If name is provided, workspace will be derived from environment variable or token, in that order

<a name='QuixStreams.Streaming.IQuixStreamingClientAsync.GetRawTopicConsumerAsync(string,string,System.Nullable_QuixStreams.Telemetry.Kafka.AutoOffsetReset_).consumerGroup'></a>

`consumerGroup` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String')

The consumer group id to use for consuming messages. If null, consumer group is not used and only consuming new messages.

<a name='QuixStreams.Streaming.IQuixStreamingClientAsync.GetRawTopicConsumerAsync(string,string,System.Nullable_QuixStreams.Telemetry.Kafka.AutoOffsetReset_).autoOffset'></a>

`autoOffset` [System.Nullable&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[QuixStreams.Telemetry.Kafka.AutoOffsetReset](https://docs.microsoft.com/en-us/dotnet/api/QuixStreams.Telemetry.Kafka.AutoOffsetReset 'QuixStreams.Telemetry.Kafka.AutoOffsetReset')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')

The offset to use when there is no saved offset for the consumer group.

#### Returns
[System.Threading.Tasks.Task&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.Task-1 'System.Threading.Tasks.Task`1')[IRawTopicConsumer](IRawTopicConsumer.md 'QuixStreams.Streaming.Raw.IRawTopicConsumer')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.Task-1 'System.Threading.Tasks.Task`1')
A task returning an instance of [IRawTopicConsumer](IRawTopicConsumer.md 'QuixStreams.Streaming.Raw.IRawTopicConsumer')
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#### [QuixStreams.Streaming](index.md 'index')
### [QuixStreams.Streaming](QuixStreams.Streaming.md 'QuixStreams.Streaming').[IQuixStreamingClientAsync](IQuixStreamingClientAsync.md 'QuixStreams.Streaming.IQuixStreamingClientAsync')

## IQuixStreamingClientAsync.GetRawTopicProducerAsync(string) Method

Asynchronously gets a topic producer capable of publishing non-quixstreams messages.

```csharp
System.Threading.Tasks.Task<QuixStreams.Streaming.Raw.IRawTopicProducer> GetRawTopicProducerAsync(string topicIdOrName);
```
#### Parameters

<a name='QuixStreams.Streaming.IQuixStreamingClientAsync.GetRawTopicProducerAsync(string).topicIdOrName'></a>

`topicIdOrName` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String')

Id or name of the topic. If name is provided, workspace will be derived from environment variable or token, in that order

#### Returns
[System.Threading.Tasks.Task&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.Task-1 'System.Threading.Tasks.Task`1')[IRawTopicProducer](IRawTopicProducer.md 'QuixStreams.Streaming.Raw.IRawTopicProducer')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.Task-1 'System.Threading.Tasks.Task`1')
A task returning an instance of [IRawTopicProducer](IRawTopicProducer.md 'QuixStreams.Streaming.Raw.IRawTopicProducer')
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#### [QuixStreams.Streaming](index.md 'index')
### [QuixStreams.Streaming](QuixStreams.Streaming.md 'QuixStreams.Streaming').[IQuixStreamingClientAsync](IQuixStreamingClientAsync.md 'QuixStreams.Streaming.IQuixStreamingClientAsync')

## IQuixStreamingClientAsync.GetTopicConsumerAsync(string, string, CommitOptions, AutoOffsetReset) Method

Asynchronously gets a topic consumer capable of subscribing to receive incoming streams.

```csharp
System.Threading.Tasks.Task<QuixStreams.Streaming.ITopicConsumer> GetTopicConsumerAsync(string topicIdOrName, string consumerGroup=null, QuixStreams.Kafka.Transport.CommitOptions options=null, QuixStreams.Telemetry.Kafka.AutoOffsetReset autoOffset=QuixStreams.Telemetry.Kafka.AutoOffsetReset.Latest);
```
#### Parameters

<a name='QuixStreams.Streaming.IQuixStreamingClientAsync.GetTopicConsumerAsync(string,string,QuixStreams.Kafka.Transport.CommitOptions,QuixStreams.Telemetry.Kafka.AutoOffsetReset).topicIdOrName'></a>

`topicIdOrName` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String')

Id or name of the topic. If name is provided, workspace will be derived from environment variable or token, in that order

<a name='QuixStreams.Streaming.IQuixStreamingClientAsync.GetTopicConsumerAsync(string,string,QuixStreams.Kafka.Transport.CommitOptions,QuixStreams.Telemetry.Kafka.AutoOffsetReset).consumerGroup'></a>

`consumerGroup` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String')

The consumer group id to use for consuming messages. If null, consumer group is not used and only consuming new messages.

<a name='QuixStreams.Streaming.IQuixStreamingClientAsync.GetTopicConsumerAsync(string,string,QuixStreams.Kafka.Transport.CommitOptions,QuixStreams.Telemetry.Kafka.AutoOffsetReset).options'></a>

`options` [QuixStreams.Kafka.Transport.CommitOptions](https://docs.microsoft.com/en-us/dotnet/api/QuixStreams.Kafka.Transport.CommitOptions 'QuixStreams.Kafka.Transport.CommitOptions')

The settings to use for committing

<a name='QuixStreams.Streaming.IQuixStreamingClientAsync.GetTopicConsumerAsync(string,string,QuixStreams.Kafka.Transport.CommitOptions,QuixStreams.Telemetry.Kafka.AutoOffsetReset).autoOffset'></a>

`autoOffset` [QuixStreams.Telemetry.Kafka.AutoOffsetReset](https://docs.microsoft.com/en-us/dotnet/api/QuixStreams.Telemetry.Kafka.AutoOffsetReset 'QuixStreams.Telemetry.Kafka.AutoOffsetReset')

The offset to use when there is no saved offset for the consumer group.

#### Returns
[System.Threading.Tasks.Task&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.Task-1 'System.Threading.Tasks.Task`1')[ITopicConsumer](ITopicConsumer.md 'QuixStreams.Streaming.ITopicConsumer')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.Task-1 'System.Threading.Tasks.Task`1')
A task returning an instance of [ITopicConsumer](ITopicConsumer.md 'QuixStreams.Streaming.ITopicConsumer')
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#### [QuixStreams.Streaming](index.md 'index')
### [QuixStreams.Streaming](QuixStreams.Streaming.md 'QuixStreams.Streaming').[IQuixStreamingClientAsync](IQuixStreamingClientAsync.md 'QuixStreams.Streaming.IQuixStreamingClientAsync')

## IQuixStreamingClientAsync.GetTopicProducerAsync(string) Method

Asynchronously gets a topic producer capable of publishing stream messages.

```csharp
System.Threading.Tasks.Task<QuixStreams.Streaming.ITopicProducer> GetTopicProducerAsync(string topicIdOrName);
```
#### Parameters

<a name='QuixStreams.Streaming.IQuixStreamingClientAsync.GetTopicProducerAsync(string).topicIdOrName'></a>

`topicIdOrName` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String')

Id or name of the topic. If name is provided, workspace will be derived from environment variable or token, in that order

#### Returns
[System.Threading.Tasks.Task&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.Task-1 'System.Threading.Tasks.Task`1')[ITopicProducer](ITopicProducer.md 'QuixStreams.Streaming.ITopicProducer')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.Task-1 'System.Threading.Tasks.Task`1')
A task returning an instance of [ITopicProducer](ITopicProducer.md 'QuixStreams.Streaming.ITopicProducer')
22 changes: 22 additions & 0 deletions docs/api-reference/IQuixStreamingClientAsync.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#### [QuixStreams.Streaming](index.md 'index')
### [QuixStreams.Streaming](QuixStreams.Streaming.md 'QuixStreams.Streaming')

## IQuixStreamingClientAsync Interface

Represents an asynchronous streaming client for Kafka configured automatically using Environment Variables and Quix platform endpoints.
Use this Client when you use this library together with Quix platform.

```csharp
public interface IQuixStreamingClientAsync
```

Derived
&#8627; [IQuixStreamingClient](IQuixStreamingClient.md 'QuixStreams.Streaming.IQuixStreamingClient')
&#8627; [QuixStreamingClient](QuixStreamingClient.md 'QuixStreams.Streaming.QuixStreamingClient')

| Methods | |
| :--- | :--- |
| [GetRawTopicConsumerAsync(string, string, Nullable&lt;AutoOffsetReset&gt;)](IQuixStreamingClientAsync.GetRawTopicConsumerAsync(string,string,Nullable_AutoOffsetReset_).md 'QuixStreams.Streaming.IQuixStreamingClientAsync.GetRawTopicConsumerAsync(string, string, System.Nullable<QuixStreams.Telemetry.Kafka.AutoOffsetReset>)') | Asynchronously gets a topic consumer capable of subscribing to receive non-quixstreams incoming messages. |
| [GetRawTopicProducerAsync(string)](IQuixStreamingClientAsync.GetRawTopicProducerAsync(string).md 'QuixStreams.Streaming.IQuixStreamingClientAsync.GetRawTopicProducerAsync(string)') | Asynchronously gets a topic producer capable of publishing non-quixstreams messages. |
| [GetTopicConsumerAsync(string, string, CommitOptions, AutoOffsetReset)](IQuixStreamingClientAsync.GetTopicConsumerAsync(string,string,CommitOptions,AutoOffsetReset).md 'QuixStreams.Streaming.IQuixStreamingClientAsync.GetTopicConsumerAsync(string, string, QuixStreams.Kafka.Transport.CommitOptions, QuixStreams.Telemetry.Kafka.AutoOffsetReset)') | Asynchronously gets a topic consumer capable of subscribing to receive incoming streams. |
| [GetTopicProducerAsync(string)](IQuixStreamingClientAsync.GetTopicProducerAsync(string).md 'QuixStreams.Streaming.IQuixStreamingClientAsync.GetTopicProducerAsync(string)') | Asynchronously gets a topic producer capable of publishing stream messages. |
4 changes: 2 additions & 2 deletions docs/api-reference/IStreamConsumer.Events.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
Gets the consumer for accessing event related information of the stream such as event definitions and values.

```csharp
QuixStreams.Streaming.Models.StreamConsumer.StreamEventsConsumer Events { get; }
QuixStreams.Streaming.Models.StreamConsumer.IStreamEventsConsumer Events { get; }
```

#### Property Value
[StreamEventsConsumer](StreamEventsConsumer.md 'QuixStreams.Streaming.Models.StreamConsumer.StreamEventsConsumer')
[IStreamEventsConsumer](IStreamEventsConsumer.md 'QuixStreams.Streaming.Models.StreamConsumer.IStreamEventsConsumer')
4 changes: 2 additions & 2 deletions docs/api-reference/IStreamConsumer.Properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
Gets the consumer for accessing the properties and metadata of the stream.

```csharp
QuixStreams.Streaming.Models.StreamConsumer.StreamPropertiesConsumer Properties { get; }
QuixStreams.Streaming.Models.StreamConsumer.IStreamPropertiesConsumer Properties { get; }
```

#### Property Value
[StreamPropertiesConsumer](StreamPropertiesConsumer.md 'QuixStreams.Streaming.Models.StreamConsumer.StreamPropertiesConsumer')
[IStreamPropertiesConsumer](IStreamPropertiesConsumer.md 'QuixStreams.Streaming.Models.StreamConsumer.IStreamPropertiesConsumer')
4 changes: 2 additions & 2 deletions docs/api-reference/IStreamConsumer.Timeseries.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
Gets the consumer for accessing timeseries related information of the stream such as parameter definitions and values.

```csharp
QuixStreams.Streaming.Models.StreamConsumer.StreamTimeseriesConsumer Timeseries { get; }
QuixStreams.Streaming.Models.StreamConsumer.IStreamTimeseriesConsumer Timeseries { get; }
```

#### Property Value
[StreamTimeseriesConsumer](StreamTimeseriesConsumer.md 'QuixStreams.Streaming.Models.StreamConsumer.StreamTimeseriesConsumer')
[IStreamTimeseriesConsumer](IStreamTimeseriesConsumer.md 'QuixStreams.Streaming.Models.StreamConsumer.IStreamTimeseriesConsumer')
13 changes: 13 additions & 0 deletions docs/api-reference/IStreamEventsConsumer.Definitions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#### [QuixStreams.Streaming](index.md 'index')
### [QuixStreams.Streaming.Models.StreamConsumer](QuixStreams.Streaming.Models.StreamConsumer.md 'QuixStreams.Streaming.Models.StreamConsumer').[IStreamEventsConsumer](IStreamEventsConsumer.md 'QuixStreams.Streaming.Models.StreamConsumer.IStreamEventsConsumer')

## IStreamEventsConsumer.Definitions Property

Gets the latest set of event definitions

```csharp
System.Collections.Generic.IList<QuixStreams.Streaming.Models.EventDefinition> Definitions { get; }
```

#### Property Value
[System.Collections.Generic.IList&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1')[EventDefinition](EventDefinition.md 'QuixStreams.Streaming.Models.EventDefinition')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1')
13 changes: 13 additions & 0 deletions docs/api-reference/IStreamEventsConsumer.OnDataReceived.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#### [QuixStreams.Streaming](index.md 'index')
### [QuixStreams.Streaming.Models.StreamConsumer](QuixStreams.Streaming.Models.StreamConsumer.md 'QuixStreams.Streaming.Models.StreamConsumer').[IStreamEventsConsumer](IStreamEventsConsumer.md 'QuixStreams.Streaming.Models.StreamConsumer.IStreamEventsConsumer')

## IStreamEventsConsumer.OnDataReceived Event

Raised when an events data package is received for the stream

```csharp
event EventHandler<EventDataReadEventArgs> OnDataReceived;
```

#### Event Type
[System.EventHandler&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.EventHandler-1 'System.EventHandler`1')[QuixStreams.Streaming.Models.StreamConsumer.EventDataReadEventArgs](https://docs.microsoft.com/en-us/dotnet/api/QuixStreams.Streaming.Models.StreamConsumer.EventDataReadEventArgs 'QuixStreams.Streaming.Models.StreamConsumer.EventDataReadEventArgs')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.EventHandler-1 'System.EventHandler`1')
14 changes: 14 additions & 0 deletions docs/api-reference/IStreamEventsConsumer.OnDefinitionsChanged.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#### [QuixStreams.Streaming](index.md 'index')
### [QuixStreams.Streaming.Models.StreamConsumer](QuixStreams.Streaming.Models.StreamConsumer.md 'QuixStreams.Streaming.Models.StreamConsumer').[IStreamEventsConsumer](IStreamEventsConsumer.md 'QuixStreams.Streaming.Models.StreamConsumer.IStreamEventsConsumer')

## IStreamEventsConsumer.OnDefinitionsChanged Event

Raised when the event definitions have changed for the stream.
See [Definitions](StreamEventsConsumer.Definitions.md 'QuixStreams.Streaming.Models.StreamConsumer.StreamEventsConsumer.Definitions') for the latest set of event definitions

```csharp
event EventHandler<EventDefinitionsChangedEventArgs> OnDefinitionsChanged;
```

#### Event Type
[System.EventHandler&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.EventHandler-1 'System.EventHandler`1')[QuixStreams.Streaming.Models.StreamConsumer.EventDefinitionsChangedEventArgs](https://docs.microsoft.com/en-us/dotnet/api/QuixStreams.Streaming.Models.StreamConsumer.EventDefinitionsChangedEventArgs 'QuixStreams.Streaming.Models.StreamConsumer.EventDefinitionsChangedEventArgs')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.EventHandler-1 'System.EventHandler`1')
25 changes: 25 additions & 0 deletions docs/api-reference/IStreamEventsConsumer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#### [QuixStreams.Streaming](index.md 'index')
### [QuixStreams.Streaming.Models.StreamConsumer](QuixStreams.Streaming.Models.StreamConsumer.md 'QuixStreams.Streaming.Models.StreamConsumer')

## IStreamEventsConsumer Interface

Interface for consumer of event streams, which raises [EventData](EventData.md 'QuixStreams.Streaming.Models.EventData') and [QuixStreams.Telemetry.Models.EventDefinitions](https://docs.microsoft.com/en-us/dotnet/api/QuixStreams.Telemetry.Models.EventDefinitions 'QuixStreams.Telemetry.Models.EventDefinitions') related messages

```csharp
public interface IStreamEventsConsumer :
System.IDisposable
```

Derived
&#8627; [StreamEventsConsumer](StreamEventsConsumer.md 'QuixStreams.Streaming.Models.StreamConsumer.StreamEventsConsumer')

Implements [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable')
| Properties | |
| :--- | :--- |
| [Definitions](IStreamEventsConsumer.Definitions.md 'QuixStreams.Streaming.Models.StreamConsumer.IStreamEventsConsumer.Definitions') | Gets the latest set of event definitions |

| Events | |
| :--- | :--- |
| [OnDataReceived](IStreamEventsConsumer.OnDataReceived.md 'QuixStreams.Streaming.Models.StreamConsumer.IStreamEventsConsumer.OnDataReceived') | Raised when an events data package is received for the stream |
| [OnDefinitionsChanged](IStreamEventsConsumer.OnDefinitionsChanged.md 'QuixStreams.Streaming.Models.StreamConsumer.IStreamEventsConsumer.OnDefinitionsChanged') | Raised when the event definitions have changed for the stream.<br/>See [Definitions](StreamEventsConsumer.Definitions.md 'QuixStreams.Streaming.Models.StreamConsumer.StreamEventsConsumer.Definitions') for the latest set of event definitions |
Loading

0 comments on commit 5a26e3a

Please sign in to comment.