Skip to content

Commit

Permalink
Merge pull request #118 from kcajmagic/feature/sessionID
Browse files Browse the repository at this point in the history
added session id to event metadata
  • Loading branch information
johnabass authored Feb 5, 2020
2 parents 35c8d13 + ffb081d commit a575d7c
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 45 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [v0.2.0]
- convert from glide to go mod
- updated release pipeline to use travis [#113](https://github.com/xmidt-org/talaria/pull/113)
- added session id to event metadata [#117](https://github.com/xmidt-org/talaria/pull/117)
- bumped webpa-common to v1.6.0 [#117](https://github.com/xmidt-org/talaria/pull/117)

## [v0.1.3]
fixed build upload
Expand All @@ -17,7 +21,8 @@ Switching to new build process
## [v0.1.1] Tue Mar 28 2017 Weston Schmidt - 0.1.1
- initial creation

[Unreleased]: https://github.com/Comcast/talaria/compare/v0.1.3...HEAD
[Unreleased]: https://github.com/Comcast/talaria/compare/v0.2.0...HEAD
[v0.2.0]: https://github.com/Comcast/talaria/compare/v0.1.3...v0.2.0
[v0.1.3]: https://github.com/Comcast/talaria/compare/v0.1.2...v0.1.3
[v0.1.2]: https://github.com/Comcast/talaria/compare/v0.1.1...v0.1.2
[v0.1.1]: https://github.com/Comcast/talaria/compare/v0.1.0...v0.1.1
Expand Down
3 changes: 3 additions & 0 deletions deviceStatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"fmt"
"strings"
"time"

"github.com/xmidt-org/webpa-common/convey"
Expand All @@ -22,6 +23,8 @@ func statusMetadata(d device.Interface) map[string]string {
wrpmeta.Field{From: "last-reconnect-reason", To: "/last-reconnect-reason"},
wrpmeta.Field{From: "protocol", To: "/protocol"}).
Set("/trust", d.Trust()).
Set("/session-id", d.SessionID()).
Set("/partner-ids", strings.Join(d.PartnerIDs(), ",")).
Build()

if allFieldsPresent {
Expand Down
2 changes: 2 additions & 0 deletions dispatcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ func testDispatcherConnectEvent(t *testing.T) {

d.On("ID").Return(device.ID("mac:123412341234"))
d.On("PartnerIDs").Return([]string{"partner-1"})
d.On("SessionID").Return("sessionID")

d.On("Convey").Return(convey.C(nil))
d.On("Trust").Return(secure.Untrusted)
d.On("ConveyCompliance").Return(convey.Full)
Expand Down
9 changes: 2 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,21 @@ module github.com/xmidt-org/talaria
go 1.12

require (
github.com/GaryBoone/GoStats v0.0.0-20130122001700-1993eafbef57 // indirect
github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2
github.com/VividCortex/gohistogram v1.0.0 // indirect
github.com/billhathaway/consistentHash v0.0.0-20140718022140-addea16d2229 // indirect
github.com/c9s/goprocinfo v0.0.0-20190309065803-0b2ad9ac246b // indirect
github.com/go-kit/kit v0.8.0
github.com/gorilla/mux v1.7.3
github.com/gorilla/schema v1.1.0 // indirect
github.com/hashicorp/consul/api v1.2.0 // indirect
github.com/influxdata/influxdb v1.7.7 // indirect
github.com/jtacoma/uritemplates v1.0.0 // indirect
github.com/justinas/alice v0.0.0-20171023064455-03f45bd4b7da
github.com/prometheus/client_golang v1.0.0
github.com/samuel/go-zookeeper v0.0.0-20190810000440-0ceca61e4d75 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spf13/pflag v1.0.3
github.com/spf13/viper v1.4.0
github.com/stretchr/testify v1.3.0
github.com/xmidt-org/webpa-common v1.3.0
github.com/xmidt-org/wrp-go v1.2.0
github.com/xmidt-org/webpa-common v1.6.0
github.com/xmidt-org/wrp-go v1.3.3
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 // indirect
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 // indirect
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 // indirect
Expand Down
Loading

0 comments on commit a575d7c

Please sign in to comment.