blob: f3189c61413f408c21536cbc1c9aa7558117a66d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/config/common/source.h>
#include <vespa/config/common/types.h>
namespace config {
class IConfigHolder;
/**
* Class for sending and receiving config request from a raw string.
*/
class RawSource : public Source {
public:
RawSource(std::shared_ptr<IConfigHolder> holder, const vespalib::string & payload);
RawSource(const RawSource &) = delete;
RawSource & operator = (const RawSource &) = delete;
~RawSource() override;
void getConfig() override;
void reload(int64_t generation) override;
void close() override;
private:
std::shared_ptr<IConfigHolder> _holder;
StringVector readConfig();
const vespalib::string _payload;
};
}
|