-
Notifications
You must be signed in to change notification settings - Fork 13
/
transport.h
49 lines (44 loc) · 1.93 KB
/
transport.h
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Copyright 2024 Synnax Labs, Inc.
//
// Use of this software is governed by the Business Source License included in the file
// licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with the Business Source
// License, use of this software will be governed by the Apache License, Version 2.0,
// included in the file licenses/APL.txt.
#pragma once
#include "client/cpp/auth/auth.h"
#include "client/cpp/channel/channel.h"
#include "client/cpp/framer/framer.h"
#include "client/cpp/hardware/hardware.h"
#include "client/cpp/ranger/ranger.h"
class Transport {
public:
Transport(
uint16_t port,
const std::string &ip,
const std::string &ca_cert_file,
const std::string &client_cert_file,
const std::string &client_key_file
);
void use(const std::shared_ptr<freighter::Middleware> &) const;
std::unique_ptr<AuthLoginClient> auth_login;
std::unique_ptr<StreamerClient> frame_stream;
std::unique_ptr<WriterClient> frame_write;
std::unique_ptr<ChannelCreateClient> chan_create;
std::unique_ptr<ChannelRetrieveClient> chan_retrieve;
std::unique_ptr<RangeRetrieveClient> range_retrieve;
std::unique_ptr<RangeCreateClient> range_create;
std::shared_ptr<RangeKVDeleteClient> range_kv_delete;
std::shared_ptr<RangeKVGetClient> range_kv_get;
std::shared_ptr<RangeKVSetClient> range_kv_set;
std::unique_ptr<HardwareCreateRackClient> rack_create_client;
std::unique_ptr<HardwareRetrieveRackClient> rack_retrieve;
std::unique_ptr<HardwareDeleteRackClient> rack_delete;
std::shared_ptr<HardwareCreateTaskClient> module_create;
std::shared_ptr<HardwareRetrieveTaskClient> module_retrieve;
std::shared_ptr<HardwareDeleteTaskClient> module_delete;
std::unique_ptr<HardwareCreateDeviceClient> device_create;
std::unique_ptr<HardwareRetrieveDeviceClient> device_retrieve;
std::unique_ptr<HardwareDeleteDeviceClient> device_delete;
};