forked from OpenAtomFoundation/pika
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpika_admin.h
667 lines (565 loc) · 21 KB
/
pika_admin.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
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
// Copyright (c) 2015-present, Qihoo, Inc. All rights reserved.
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree. An additional grant
// of patent rights can be found in the PATENTS file in the same directory.
#ifndef PIKA_ADMIN_H_
#define PIKA_ADMIN_H_
#include <sys/resource.h>
#include <sys/time.h>
#include <iomanip>
#include <memory>
#include <sstream>
#include <string>
#include <unordered_map>
#include <vector>
#include "storage/storage.h"
#include "include/pika_command.h"
#include "pika_db.h"
/*
* Admin
*/
class SlaveofCmd : public Cmd {
public:
SlaveofCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new SlaveofCmd(*this); }
private:
std::string master_ip_;
int64_t master_port_ = -1;
bool is_none_ = false;
void DoInitial() override;
void Clear() override {
is_none_ = false;
master_ip_.clear();
master_port_ = 0;
}
};
class DbSlaveofCmd : public Cmd {
public:
DbSlaveofCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new DbSlaveofCmd(*this); }
private:
std::string db_name_;
bool force_sync_ = false;
bool is_none_ = false;
bool have_offset_ = false;
int64_t filenum_ = 0;
int64_t offset_ = 0;
void DoInitial() override;
void Clear() override {
db_name_.clear();
force_sync_ = false;
is_none_ = false;
have_offset_ = false;
}
};
class AuthCmd : public Cmd {
public:
AuthCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new AuthCmd(*this); }
private:
std::string pwd_;
void DoInitial() override;
};
class BgsaveCmd : public Cmd {
public:
BgsaveCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new BgsaveCmd(*this); }
private:
void DoInitial() override;
void Clear() override { bgsave_dbs_.clear(); }
std::set<std::string> bgsave_dbs_;
};
class CompactCmd : public Cmd {
public:
CompactCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new CompactCmd(*this); }
private:
void DoInitial() override;
void Clear() override {
struct_type_.clear();
compact_dbs_.clear();
}
std::string struct_type_;
std::set<std::string> compact_dbs_;
};
// we can use pika/tests/helpers/test_queue.py to test this command
class CompactRangeCmd : public Cmd {
public:
CompactRangeCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new CompactRangeCmd(*this); }
private:
void DoInitial() override;
void Clear() override {
struct_type_.clear();
compact_dbs_.clear();
start_key_.clear();
end_key_.clear();
}
std::string struct_type_;
std::set<std::string> compact_dbs_;
std::string start_key_;
std::string end_key_;
};
class PurgelogstoCmd : public Cmd {
public:
PurgelogstoCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new PurgelogstoCmd(*this); }
private:
uint32_t num_ = 0;
std::string db_;
void DoInitial() override;
};
class PingCmd : public Cmd {
public:
PingCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new PingCmd(*this); }
private:
void DoInitial() override;
};
class SelectCmd : public Cmd {
public:
SelectCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new SelectCmd(*this); }
private:
void DoInitial() override;
void Clear() override { db_name_.clear(); }
std::string db_name_;
std::shared_ptr<DB> select_db_;
};
class FlushallCmd : public Cmd {
public:
FlushallCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new FlushallCmd(*this); }
void Execute() override;
void FlushAllWithoutLock();
private:
void DoInitial() override;
std::string ToRedisProtocol() override;
void DoWithoutLock(std::shared_ptr<Slot> slot);
};
class FlushdbCmd : public Cmd {
public:
FlushdbCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new FlushdbCmd(*this); }
void FlushAllSlotsWithoutLock(std::shared_ptr<DB> db);
void Execute() override;
std::string GetFlushDname() { return db_name_; }
private:
std::string db_name_;
void DoInitial() override;
void Clear() override { db_name_.clear(); }
void DoWithoutLock(std::shared_ptr<Slot> slot);
};
class ClientCmd : public Cmd {
public:
ClientCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
const static std::string CLIENT_LIST_S;
const static std::string CLIENT_KILL_S;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new ClientCmd(*this); }
private:
std::string operation_, info_;
void DoInitial() override;
};
class InfoCmd : public Cmd {
public:
enum InfoSection {
kInfoErr = 0x0,
kInfoServer,
kInfoClients,
kInfoStats,
kInfoExecCount,
kInfoCPU,
kInfoReplication,
kInfoKeyspace,
kInfoLog,
kInfoData,
kInfoRocksDB,
kInfo,
kInfoAll,
kInfoDebug,
kInfoCommandStats
};
InfoCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new InfoCmd(*this); }
void Execute() override;
private:
InfoSection info_section_;
bool rescan_ = false; // whether to rescan the keyspace
bool off_ = false;
std::set<std::string> keyspace_scan_dbs_;
const static std::string kInfoSection;
const static std::string kAllSection;
const static std::string kServerSection;
const static std::string kClientsSection;
const static std::string kStatsSection;
const static std::string kExecCountSection;
const static std::string kCPUSection;
const static std::string kReplicationSection;
const static std::string kKeyspaceSection;
const static std::string kDataSection;
const static std::string kRocksDBSection;
const static std::string kDebugSection;
const static std::string kCommandStatsSection;
void DoInitial() override;
void Clear() override {
rescan_ = false;
off_ = false;
keyspace_scan_dbs_.clear();
}
void InfoServer(std::string& info);
void InfoClients(std::string& info);
void InfoStats(std::string& info);
void InfoExecCount(std::string& info);
void InfoCPU(std::string& info);
void InfoShardingReplication(std::string& info);
void InfoReplication(std::string& info);
void InfoKeyspace(std::string& info);
void InfoData(std::string& info);
void InfoRocksDB(std::string& info);
void InfoDebug(std::string& info);
void InfoCommandStats(std::string& info);
};
class ShutdownCmd : public Cmd {
public:
ShutdownCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new ShutdownCmd(*this); }
private:
void DoInitial() override;
};
class ConfigCmd : public Cmd {
public:
ConfigCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new ConfigCmd(*this); }
void Execute() override;
private:
std::vector<std::string> config_args_v_;
void DoInitial() override;
void ConfigGet(std::string& ret);
void ConfigSet(std::string& ret);
void ConfigRewrite(std::string& ret);
void ConfigResetstat(std::string& ret);
void ConfigRewriteReplicationID(std::string& ret);
};
class MonitorCmd : public Cmd {
public:
MonitorCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new MonitorCmd(*this); }
private:
void DoInitial() override;
};
class DbsizeCmd : public Cmd {
public:
DbsizeCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new DbsizeCmd(*this); }
private:
void DoInitial() override;
};
class TimeCmd : public Cmd {
public:
TimeCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new TimeCmd(*this); }
private:
void DoInitial() override;
};
class DelbackupCmd : public Cmd {
public:
DelbackupCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new DelbackupCmd(*this); }
private:
void DoInitial() override;
};
class EchoCmd : public Cmd {
public:
EchoCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Merge() override {};
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
Cmd* Clone() override { return new EchoCmd(*this); }
private:
std::string body_;
void DoInitial() override;
};
class ScandbCmd : public Cmd {
public:
ScandbCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new ScandbCmd(*this); }
private:
storage::DataType type_ = storage::kAll;
void DoInitial() override;
void Clear() override { type_ = storage::kAll; }
};
class SlowlogCmd : public Cmd {
public:
enum SlowlogCondition { kGET, kLEN, kRESET };
SlowlogCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new SlowlogCmd(*this); }
private:
int64_t number_ = 10;
SlowlogCmd::SlowlogCondition condition_ = kGET;
void DoInitial() override;
void Clear() override {
number_ = 10;
condition_ = kGET;
}
};
class PaddingCmd : public Cmd {
public:
PaddingCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new PaddingCmd(*this); }
private:
void DoInitial() override;
std::string ToRedisProtocol() override;
};
class PKPatternMatchDelCmd : public Cmd {
public:
PKPatternMatchDelCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new PKPatternMatchDelCmd(*this); }
private:
storage::DataType type_ = storage::kAll;
std::string pattern_;
void DoInitial() override;
};
class DummyCmd : public Cmd {
public:
DummyCmd() : Cmd("", 0, 0) {}
DummyCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new DummyCmd(*this); }
private:
void DoInitial() override;
};
class QuitCmd : public Cmd {
public:
QuitCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new QuitCmd(*this); }
private:
void DoInitial() override;
};
class HelloCmd : public Cmd {
public:
HelloCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new HelloCmd(*this); }
private:
void DoInitial() override;
};
class DiskRecoveryCmd : public Cmd {
public:
DiskRecoveryCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new DiskRecoveryCmd(*this); }
private:
void DoInitial() override;
std::map<std::string, uint64_t> background_errors_;
};
class ClearReplicationIDCmd : public Cmd {
public:
ClearReplicationIDCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new ClearReplicationIDCmd(*this); }
void DoBinlog(const std::shared_ptr<SyncMasterSlot>& slot) override {};
private:
void DoInitial() override;
};
class DisableWalCmd : public Cmd {
public:
DisableWalCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new DisableWalCmd(*this); }
private:
void DoInitial() override;
};
#ifdef WITH_COMMAND_DOCS
class CommandCmd : public Cmd {
public:
CommandCmd(const std::string& name, int arity, uint16_t flag) : Cmd(name, arity, flag) {}
void Do(std::shared_ptr<Slot> slot = nullptr) override;
void Split(std::shared_ptr<Slot> slot, const HintKeys& hint_keys) override {};
void Merge() override {};
Cmd* Clone() override { return new CommandCmd(*this); }
class CommandFieldCompare {
public:
CommandFieldCompare() = default;
bool operator()(const std::string&, const std::string&) const;
private:
const static std::unordered_map<std::string, int> kFieldNameOrder;
};
class Encodable;
using EncodablePtr = std::shared_ptr<Encodable>;
class Encodable {
public:
friend CmdRes& operator<<(CmdRes& res, const Encodable& e) { return e.EncodeTo(res); }
EncodablePtr operator+(const EncodablePtr& other) { return MergeFrom(other); }
protected:
virtual CmdRes& EncodeTo(CmdRes&) const = 0;
virtual EncodablePtr MergeFrom(const EncodablePtr& other) const = 0;
};
class EncodableInt : public Encodable {
public:
EncodableInt(int value) : value_(value) {}
EncodableInt(unsigned long long value) : value_(value) {}
protected:
CmdRes& EncodeTo(CmdRes& res) const override;
EncodablePtr MergeFrom(const EncodablePtr& other) const override;
private:
int value_;
};
class EncodableString : public Encodable {
public:
EncodableString(std::string value) : value_(std::move(value)) {}
protected:
CmdRes& EncodeTo(CmdRes& res) const override;
EncodablePtr MergeFrom(const EncodablePtr& other) const override;
private:
std::string value_;
};
class EncodableMap : public Encodable {
public:
using RedisMap = std::map<std::string, EncodablePtr, CommandFieldCompare>;
EncodableMap(RedisMap values) : values_(std::move(values)) {}
template <typename Map>
static CmdRes& EncodeTo(CmdRes& res, const Map& map, const Map& specialization = Map());
protected:
CmdRes& EncodeTo(CmdRes& res) const override;
EncodablePtr MergeFrom(const EncodablePtr& other) const override;
private:
RedisMap values_;
const static std::string kPrefix;
};
class EncodableSet : public Encodable {
public:
EncodableSet(std::vector<EncodablePtr> values) : values_(std::move(values)) {}
protected:
CmdRes& EncodeTo(CmdRes& res) const override;
EncodablePtr MergeFrom(const EncodablePtr& other) const override;
private:
std::vector<EncodablePtr> values_;
const static std::string kPrefix;
};
class EncodableArray : public Encodable {
public:
EncodableArray(std::vector<EncodablePtr> values) : values_(std::move(values)) {}
protected:
CmdRes& EncodeTo(CmdRes& res) const override;
EncodablePtr MergeFrom(const EncodablePtr& other) const override;
private:
std::vector<EncodablePtr> values_;
};
class EncodableStatus : public Encodable {
public:
EncodableStatus(std::string value) : value_(std::move(value)) {}
protected:
CmdRes& EncodeTo(CmdRes& res) const override;
EncodablePtr MergeFrom(const EncodablePtr& other) const override;
private:
std::string value_;
const static std::string kPrefix;
};
private:
void DoInitial() override;
std::string command_;
std::vector<std::string>::const_iterator cmds_begin_, cmds_end_;
const static std::string kPikaField;
const static EncodablePtr kNotSupportedLiteral;
const static EncodablePtr kCompatibleLiteral;
const static EncodablePtr kBitSpecLiteral;
const static EncodablePtr kHyperLogLiteral;
const static EncodablePtr kPubSubLiteral;
const static EncodablePtr kNotSupportedSpecialization;
const static EncodablePtr kCompatibleSpecialization;
const static EncodablePtr kBitSpecialization;
const static EncodablePtr kHyperLogSpecialization;
const static EncodablePtr kPubSubSpecialization;
const static std::unordered_map<std::string, EncodablePtr> kPikaSpecialization;
const static std::unordered_map<std::string, EncodablePtr> kCommandDocs;
};
static CommandCmd::EncodablePtr operator""_RedisInt(unsigned long long value);
static CommandCmd::EncodablePtr operator""_RedisString(const char* value);
static CommandCmd::EncodablePtr operator""_RedisStatus(const char* value);
static CommandCmd::EncodablePtr RedisMap(CommandCmd::EncodableMap::RedisMap values);
static CommandCmd::EncodablePtr RedisSet(std::vector<CommandCmd::EncodablePtr> values);
static CommandCmd::EncodablePtr RedisArray(std::vector<CommandCmd::EncodablePtr> values);
#endif // WITH_COMMAND_DOCS
#endif // PIKA_ADMIN_H_