aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib/src/vespa/vespalib/net/http/component_config_producer.h
blob: 81ba8f8b03d87dc9ef71bd8a7b461da7ea27f759 (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/vespalib/stllike/string.h>

namespace vespalib {

struct ComponentConfigProducer {
    struct Config {
        vespalib::string name;
        size_t gen;
        vespalib::string msg;
        Config(const vespalib::string &n, size_t g) : name(n), gen(g), msg() {}
        Config(const vespalib::string &n, size_t g, const vespalib::string &m)
            : name(n), gen(g), msg(m) {}
        ~Config();
    };
    struct Consumer {
        virtual void add(const Config &config) = 0;
        virtual ~Consumer() {}
    };
    virtual void getComponentConfig(Consumer &consumer) = 0;
    virtual ~ComponentConfigProducer() {}
};

} // namespace vespalib