()
| 49 | } |
| 50 | |
| 51 | func newTelemetryStore() (*TelemetryStore, error) { |
| 52 | hashSalt, err := cryptorand.String(16) |
| 53 | if err != nil { |
| 54 | return nil, err |
| 55 | } |
| 56 | return &TelemetryStore{ |
| 57 | hashSalt: hashSalt, |
| 58 | hashCache: make(map[string]string), |
| 59 | }, nil |
| 60 | } |
| 61 | |
| 62 | // newEvent returns the current telemetry state as an event |
| 63 | func (b *TelemetryStore) newEvent() *proto.TelemetryEvent { |