aboutsummaryrefslogtreecommitdiffstats
path: root/config/src/vespa/config/subscription/configsubscriber.hpp
blob: 7e3121a9e437a0309471f671df774c9b8a3122ba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright Vespa.ai. 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));
}

}