aboutsummaryrefslogtreecommitdiffstats
path: root/config/src/vespa/config/subscription/configsubscriber.hpp
blob: aeaf0befcbd31084a1711f0f99b099451340fc4e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "configsubscriber.h"
#include "confighandle.hpp"

namespace config {

template <typename ConfigType>
std::unique_ptr<ConfigHandle<ConfigType> >
ConfigSubscriber::subscribe(const std::string & configId, vespalib::duration timeout)
{
    const ConfigKey key(ConfigKey::create<ConfigType>(configId));
    return std::make_unique<ConfigHandle<ConfigType> >(_set.subscribe(key, timeout));
}

}