Class: Kube::Cluster::Standard::Perses::PersesDatasource
- Inherits:
-
Object
- Object
- Kube::Cluster::Standard::Perses::PersesDatasource
- Defined in:
- lib/kube/cluster/standard/perses/perses_datasource.rb
Overview
A Perses datasource, proxied over HTTP to the given url.
Instance Method Summary collapse
-
#initialize(name:, plugin_kind:, url:, display_name: nil, default: false, &block) ⇒ PersesDatasource
constructor
A new instance of PersesDatasource.
Constructor Details
#initialize(name:, plugin_kind:, url:, display_name: nil, default: false, &block) ⇒ PersesDatasource
Returns a new instance of PersesDatasource.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/kube/cluster/standard/perses/perses_datasource.rb', line 12 def initialize(name:, plugin_kind:, url:, display_name: nil, default: false, &block) super() { .name = name spec.config = { default: default, display: { name: display_name || name }, plugin: { kind: plugin_kind, spec: { proxy: { kind: "HTTPProxy", spec: { url: url }, }, }, }, } instance_exec(&block) if block } end |