persistence-providers 0.0.2.2 → 0.0.2.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ef2d4539ee594c0fb786be1ee20ceb0a9a2b79743ee6f02702b2c28f49b3fd2
|
4
|
+
data.tar.gz: 43347f89e40adb8701fc82ae6f214cf34c37c058b8692e6707efad399f34bb8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19d06a2a39e86b386a991f2157db68ffdc228a2ca3ecd8f25da6eed429b9a058c3e12613bbb83bc6feb899d00c17cd9b08e04157d52835198073cba45adae97f
|
7
|
+
data.tar.gz: 81390b3e8c7ba7579b39f0e0d16826f93e0e9f6d5965a984e9973c037b298adfa967ebb2b8d6b6fa043eb1927a07f3c93c99f44f218f296c50184bf1d644d4b5
|
@@ -17,12 +17,14 @@ module DTK::State
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def write(namespace, crd_component_name, component_instance_name, attribute_name, value, opts = {}, timestamp = nil)
|
20
|
-
|
21
|
-
|
20
|
+
if opts[:provider] == "correlation"
|
21
|
+
errors = client.measurement_helper(:errors)
|
22
|
+
required_tags = get_required_tags(namespace, crd_component_name, component_instance_name, attribute_name)
|
23
|
+
required_tags.merge!({ correlator_type: opts[:entrypoint].split("/").last.split(".")[0] })
|
24
|
+
errors.write(value.to_s, required_tags, timestamp)
|
25
|
+
elsif
|
22
26
|
required_tags = get_required_tags(namespace, crd_component_name, component_instance_name, attribute_name)
|
23
27
|
measurement.write(value, required_tags, timestamp)
|
24
|
-
rescue => error
|
25
|
-
puts error
|
26
28
|
end
|
27
29
|
end
|
28
30
|
|
@@ -83,7 +85,7 @@ module DTK::State
|
|
83
85
|
crd_component_name: crd_component_name,
|
84
86
|
component_instance_name: component_instance_name,
|
85
87
|
attribute_name: attribute_name,
|
86
|
-
task_id: 1
|
88
|
+
task_id: "1"
|
87
89
|
}
|
88
90
|
end
|
89
91
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module DTK::State
|
2
|
+
class Component::Attribute::Influxdb
|
3
|
+
class Measurement
|
4
|
+
class Errors < self
|
5
|
+
|
6
|
+
def write(value, params_hash = {}, timestamp)
|
7
|
+
checked_params_hash = check_params_hash(params_hash)
|
8
|
+
write_point(value, checked_params_hash, timestamp)
|
9
|
+
end
|
10
|
+
|
11
|
+
protected
|
12
|
+
|
13
|
+
def required_params
|
14
|
+
[:namespace, :crd_component_name, :component_instance_name, :task_id, :attribute_name, :task_id, :correlator_type]
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: persistence-providers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.2.
|
4
|
+
version: 0.0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Reactor8
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03
|
11
|
+
date: 2020-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kubeclient
|
@@ -67,6 +67,7 @@ files:
|
|
67
67
|
- lib/state/component/providers/influxdb/client.rb
|
68
68
|
- lib/state/component/providers/influxdb/measurement.rb
|
69
69
|
- lib/state/component/providers/influxdb/measurement/attribute_measurement.rb
|
70
|
+
- lib/state/component/providers/influxdb/measurement/errors.rb
|
70
71
|
- lib/state/component/providers/influxdb/measurement/events.rb
|
71
72
|
- lib/state/component/providers/influxdb/measurement/states.rb
|
72
73
|
- lib/state/component/providers/kube_crd.rb
|