Skip to content

Commit

Permalink
feat: Sensor-controller and Sensor re-implementation (#723)
Browse files Browse the repository at this point in the history
* feat: Sensor controller re-implementation

* use cloudevent properties instead of multiple subjects

* implment sensor logic

* fix sensor part code

* refac eventbus driver

* fix NATS duplicated clientID issue

* update gateway to use eventbus

* remove unused fileds

* fix test cases

* test case again

* fix

* fix lint issue

* still lint

* clean up

* log change

* defaults nats volume to 10G

* mocks

* not watch service

* remove unused env

* minor
  • Loading branch information
whynowy authored Jul 8, 2020
1 parent 9a62f30 commit 4e8cf29
Show file tree
Hide file tree
Showing 101 changed files with 4,347 additions and 11,363 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ all-controller-images: sensor-controller-image gateway-controller-image eventbus

# Sensor
sensor:
go build -v -ldflags '${LDFLAGS}' -o ${DIST_DIR}/sensor ./sensors/cmd/client.go
go build -v -ldflags '${LDFLAGS}' -o ${DIST_DIR}/sensor ./sensors/cmd/main.go

sensor-linux:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 make sensor
Expand Down Expand Up @@ -148,6 +148,7 @@ codegen:
./hack/update-openapigen.sh
$(MAKE) swagger
./hack/update-api-docs.sh
./hack/update-mocks.sh
rm -rf ./vendor
go mod tidy
$(MAKE) manifests
Expand Down
134 changes: 18 additions & 116 deletions api/gateway.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,37 +159,35 @@ <h3 id="argoproj.io/v1alpha1.Gateway">Gateway
</tr>
<tr>
<td>
<code>subscribers</code></br>
<code>processorPort</code></br>
<em>
<a href="#argoproj.io/v1alpha1.Subscribers">
Subscribers
</a>
string
</em>
</td>
<td>
<em>(Optional)</em>
<p>Port on which the gateway event source processor is running on.</p>
</td>
</tr>
<tr>
<td>
<code>processorPort</code></br>
<code>replica</code></br>
<em>
string
int32
</em>
</td>
<td>
<p>Port on which the gateway event source processor is running on.</p>
<p>Replica is the gateway deployment replicas</p>
</td>
</tr>
<tr>
<td>
<code>replica</code></br>
<code>eventBusName</code></br>
<em>
int32
string
</em>
</td>
<td>
<p>Replica is the gateway deployment replicas</p>
<p>EventBusName references to a EventBus name. By default the value is &ldquo;default&rdquo;</p>
</td>
</tr>
</table>
Expand Down Expand Up @@ -314,37 +312,35 @@ <h3 id="argoproj.io/v1alpha1.GatewaySpec">GatewaySpec
</tr>
<tr>
<td>
<code>subscribers</code></br>
<code>processorPort</code></br>
<em>
<a href="#argoproj.io/v1alpha1.Subscribers">
Subscribers
</a>
string
</em>
</td>
<td>
<em>(Optional)</em>
<p>Port on which the gateway event source processor is running on.</p>
</td>
</tr>
<tr>
<td>
<code>processorPort</code></br>
<code>replica</code></br>
<em>
string
int32
</em>
</td>
<td>
<p>Port on which the gateway event source processor is running on.</p>
<p>Replica is the gateway deployment replicas</p>
</td>
</tr>
<tr>
<td>
<code>replica</code></br>
<code>eventBusName</code></br>
<em>
int32
string
</em>
</td>
<td>
<p>Replica is the gateway deployment replicas</p>
<p>EventBusName references to a EventBus name. By default the value is &ldquo;default&rdquo;</p>
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -471,58 +467,6 @@ <h3 id="argoproj.io/v1alpha1.Metadata">Metadata
</tr>
</tbody>
</table>
<h3 id="argoproj.io/v1alpha1.NATSSubscriber">NATSSubscriber
</h3>
<p>
(<em>Appears on:</em>
<a href="#argoproj.io/v1alpha1.Subscribers">Subscribers</a>)
</p>
<p>
<p>NATSSubscriber holds the context of subscriber over NATS.</p>
</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>serverURL</code></br>
<em>
string
</em>
</td>
<td>
<p>ServerURL refers to the NATS server URL.</p>
</td>
</tr>
<tr>
<td>
<code>subject</code></br>
<em>
string
</em>
</td>
<td>
<p>Subject refers to the NATS subject name.</p>
</td>
</tr>
<tr>
<td>
<code>name</code></br>
<em>
string
</em>
</td>
<td>
<p>Name of the subscription. Must be unique.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="argoproj.io/v1alpha1.NodePhase">NodePhase
(<code>string</code> alias)</p></h3>
<p>
Expand Down Expand Up @@ -705,48 +649,6 @@ <h3 id="argoproj.io/v1alpha1.Service">Service
</tr>
</tbody>
</table>
<h3 id="argoproj.io/v1alpha1.Subscribers">Subscribers
</h3>
<p>
(<em>Appears on:</em>
<a href="#argoproj.io/v1alpha1.GatewaySpec">GatewaySpec</a>)
</p>
<p>
</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>http</code></br>
<em>
[]string
</em>
</td>
<td>
<em>(Optional)</em>
</td>
</tr>
<tr>
<td>
<code>nats</code></br>
<em>
<a href="#argoproj.io/v1alpha1.NATSSubscriber">
[]NATSSubscriber
</a>
</em>
</td>
<td>
<em>(Optional)</em>
</td>
</tr>
</tbody>
</table>
<h3 id="argoproj.io/v1alpha1.Template">Template
</h3>
<p>
Expand Down
Loading

0 comments on commit 4e8cf29

Please sign in to comment.