1 // Copyright (c) 2017 Nuxi, https://nuxi.nl/
2 //
3 // This file is distributed under a 2-clause BSD license.
4 // See the LICENSE file for details.
5 
6 #ifndef FLOWER_SWITCHBOARD_TARGET_PICKER_H
7 #define FLOWER_SWITCHBOARD_TARGET_PICKER_H
8 
9 #include <functional>
10 #include <memory>
11 
12 #include <arpc++/arpc++.h>
13 
14 #include <flower/util/label_map.h>
15 
16 namespace flower {
17 namespace switchboard {
18 
19 class Directory;
20 class Listener;
21 
22 class TargetPicker {
23  public:
24   arpc::Status Pick(
25       Directory* directory, const util::LabelMap& out_labels,
26       std::function<arpc::Status(const util::LabelMap& connection_labels,
27                                  const std::shared_ptr<Listener>& listener)>
28           selector);
29 };
30 
31 }  // namespace switchboard
32 }  // namespace flower
33 
34 #endif
35