Skip to content

Commit

Permalink
scope & groups types
Browse files Browse the repository at this point in the history
  • Loading branch information
jpinsonneau committed Nov 8, 2024
1 parent f70ee2e commit d5b3958
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions web/src/model/flow-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,18 @@ export type PacketLoss = 'dropped' | 'hasDrops' | 'sent' | 'all';
export type MetricFunction = 'count' | 'sum' | 'avg' | 'min' | 'max' | 'p90' | 'p99' | 'rate';
export type StatFunction = MetricFunction | 'last';
export type MetricType = 'Flows' | 'DnsFlows' | Field;
export type FlowScope = 'app' | 'cluster' | 'zone' | 'host' | 'namespace' | 'owner' | 'resource' | string;
// scope are configurable and can be any string
// such as 'app', 'cluster', 'zone', 'host', 'namespace', 'owner', 'resource'...
export type FlowScope = string;
export type AggregateBy = FlowScope | Field;
export type NodeType = FlowScope | 'unknown';
export type Groups =
| 'clusters'
| 'clusters+zones'
| 'clusters+hosts'
| 'clusters+namespaces'
| 'clusters+owners'
| 'zones'
| 'zones+hosts'
| 'zones+namespaces'
| 'zones+owners'
| 'hosts'
| 'hosts+namespaces'
| 'hosts+owners'
| 'namespaces'
| 'namespaces+owners'
| 'owners'
| string;
// groups are configurable and can be any string
// such as 'clusters', 'clusters+zones', 'clusters+hosts', 'clusters+namespaces', 'clusters+owners',
// 'zones', 'zones+hosts', 'zones+namespaces', 'zones+owners',
// 'hosts', 'hosts+namespaces', 'hosts+owners',
// 'namespaces', 'namespaces+owners',
// 'owners'...
export type Groups = string;

export interface FlowQuery {
timeRange?: number;
Expand Down

0 comments on commit d5b3958

Please sign in to comment.