aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Disks/registerDisks.cpp
blob: 036236f332b35df4cfb9033ca799a2a8ec106bed (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#include "registerDisks.h"

#include "DiskFactory.h"

#include "clickhouse_config.h"

namespace DB
{

void registerDiskLocal(DiskFactory & factory, bool global_skip_access_check);

#if USE_AWS_S3
void registerDiskS3(DiskFactory & factory, bool global_skip_access_check);
#endif

#if USE_AZURE_BLOB_STORAGE
void registerDiskAzureBlobStorage(DiskFactory & factory, bool global_skip_access_check);
#endif

#if USE_SSL
void registerDiskEncrypted(DiskFactory & factory, bool global_skip_access_check);
#endif

#if USE_HDFS
void registerDiskHDFS(DiskFactory & factory, bool global_skip_access_check);
#endif

void registerDiskWebServer(DiskFactory & factory, bool global_skip_access_check);

void registerDiskCache(DiskFactory & factory, bool global_skip_access_check);

void registerDiskLocalObjectStorage(DiskFactory & factory, bool global_skip_access_check);


#ifndef CLICKHOUSE_KEEPER_STANDALONE_BUILD

void registerDisks(bool global_skip_access_check)
{
    auto & factory = DiskFactory::instance();

    registerDiskLocal(factory, global_skip_access_check);

#if USE_AWS_S3
    registerDiskS3(factory, global_skip_access_check);
#endif

#if USE_AZURE_BLOB_STORAGE
    registerDiskAzureBlobStorage(factory, global_skip_access_check);
#endif

#if USE_SSL
    registerDiskEncrypted(factory, global_skip_access_check);
#endif

#if USE_HDFS
    registerDiskHDFS(factory, global_skip_access_check);
#endif

    registerDiskWebServer(factory, global_skip_access_check);

    registerDiskCache(factory, global_skip_access_check);

    registerDiskLocalObjectStorage(factory, global_skip_access_check);
}

#else

void registerDisks(bool global_skip_access_check)
{
    auto & factory = DiskFactory::instance();

    registerDiskLocal(factory, global_skip_access_check);

#if USE_AWS_S3
    registerDiskS3(factory, global_skip_access_check);
#endif
}

#endif

}