Skip to content

Commit

Permalink
Updates segments docs
Browse files Browse the repository at this point in the history
  • Loading branch information
michaloo committed Mar 22, 2018
1 parent a932e32 commit 7872ffe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* added `timeout` option to `Hull.Connector` constructor to control the timeout value
* upgrades `raven` library
* add support for batch handlers for accounts
* adds `users_segments` and `accounts_segments` to Context Object
* **deprecation** Renamed `userHandlerOptions` to `options` in notifyHandler
* flow types fixes

Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ Here is the base structure of the Context Object (we also provide Flow type for
// set by Hull.Connector
connectorConfig: {},
segments: [],
users_segments: [],
accounts_segments: [],

cache: {},
enqueue: () => {},
metric: {},
Expand Down Expand Up @@ -203,7 +206,9 @@ Hash with connector settings, details in Hull.Connector [constructor reference](
```

An array of segments defined at the organization, it's being automatically exposed to the context object.
The segment flow type is specified [here](/API.md#thullsegment).
The segment flow type is specified [here](./src/types/hull-segment.js).

`users_segments` param is alias to `segments` and `accounts_segments` exposes list of segments for accounts.

### **cache**

Expand Down
3 changes: 2 additions & 1 deletion src/types/hull-req-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ export type THullReqContext = {
hostname: string;
options: Object;


connectorConfig: Object;
segments: Array<THullSegment>;
users_segments: Array<THullSegment>;
accounts_segments: Array<THullSegment>;
cache: Object;
metric: Object;
enqueue: Function;
Expand Down

0 comments on commit 7872ffe

Please sign in to comment.