-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathWSActionReq.cs
More file actions
61 lines (54 loc) · 2.34 KB
/
WSActionReq.cs
File metadata and controls
61 lines (54 loc) · 2.34 KB
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
using Newtonsoft.Json;
namespace TDengine.Driver.Impl.WebSocketMethods.Protocol
{
public static class WSAction
{
public const string Version = "version";
public const string Conn = "conn";
public const string Query = "query";
public const string Fetch = "fetch";
public const string FetchBlock = "fetch_block";
public const string FreeResult = "free_result";
public const string STMTInit = "init";
public const string STMTPrepare = "prepare";
public const string STMTSetTableName = "set_table_name";
public const string STMTSetTags = "set_tags";
public const string STMTBind = "bind";
public const string STMTAddBatch = "add_batch";
public const string STMTExec = "exec";
public const string STMTClose = "close";
public const string STMTGetTagFields = "get_tag_fields";
public const string STMTGetColFields = "get_col_fields";
public const string STMTUseResult = "use_result";
public const string SchemalessWrite = "insert";
}
public static class WSActionBinary
{
public const int SetTagsMessage = 1;
public const int BindMessage = 2;
public const int BinaryQueryMessage = 6;
public const int FetchRawBlockMessage = 7;
}
public static class WSTMQAction
{
public const string TMQSubscribe = "subscribe";
public const string TMQPoll = "poll";
public const string TMQFetch = "fetch";
public const string TMQFetchBlock = "fetch_block";
public const string TMQFetchRaw = "fetch_raw";
public const string TMQFetchJsonMeta = "fetch_json_meta";
public const string TMQCommit = "commit";
public const string TMQUnsubscribe = "unsubscribe";
public const string TMQGetTopicAssignment = "assignment";
public const string TMQSeek = "seek";
public const string TMQCommitOffset = "commit_offset";
public const string TMQCommitted = "committed";
public const string TMQPosition = "position";
public const string TMQListTopics = "list_topics";
}
public class WSActionReq<T>
{
[JsonProperty("action")] public string Action { get; set; }
[JsonProperty("args")] public T Args { get; set; }
}
}