Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
c82565bd
M
milvus
项目概览
milvus
/
milvus
12 个月 前同步成功
通知
261
Star
22476
Fork
2472
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c82565bd
编写于
1月 04, 2021
作者:
G
GuoRentong
提交者:
yefu.chen
1月 04, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update doc: service api
Signed-off-by:
N
GuoRentong
<
rentong.guo@zilliz.com
>
上级
03b5d325
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
140 addition
and
113 deletion
+140
-113
docs/developer_guides/appendix_a_basic_components.md
docs/developer_guides/appendix_a_basic_components.md
+0
-105
docs/developer_guides/chap03_index_builder.md
docs/developer_guides/chap03_index_builder.md
+1
-1
docs/developer_guides/chap04_message_stream.md
docs/developer_guides/chap04_message_stream.md
+106
-2
docs/developer_guides/chap05_proxy.md
docs/developer_guides/chap05_proxy.md
+6
-2
docs/developer_guides/chap06_master.md
docs/developer_guides/chap06_master.md
+2
-3
docs/developer_guides/chap07_query_service.md
docs/developer_guides/chap07_query_service.md
+24
-0
docs/developer_guides/chap09_data_service.md
docs/developer_guides/chap09_data_service.md
+1
-0
docs/developer_guides/figs/data_service.jpeg
docs/developer_guides/figs/data_service.jpeg
+0
-0
docs/developer_guides/figs/index_service.jpeg
docs/developer_guides/figs/index_service.jpeg
+0
-0
docs/developer_guides/figs/local_distributed_cloud.jpeg
docs/developer_guides/figs/local_distributed_cloud.jpeg
+0
-0
docs/developer_guides/figs/master.jpeg
docs/developer_guides/figs/master.jpeg
+0
-0
docs/developer_guides/figs/proxy.jpeg
docs/developer_guides/figs/proxy.jpeg
+0
-0
docs/developer_guides/figs/query_service.jpeg
docs/developer_guides/figs/query_service.jpeg
+0
-0
未找到文件。
docs/developer_guides/appendix_a_basic_components.md
浏览文件 @
c82565bd
...
...
@@ -70,111 +70,6 @@ etcd:
#### A.3 Message Stream
```
go
type
MsgType
uint32
const
{
kInsert
MsgType
=
400
kDelete
MsgType
=
401
kSearch
MsgType
=
500
KSearchResult
MsgType
=
1000
kSegStatistics
MsgType
=
1100
kTimeTick
MsgType
=
1200
kTimeSync
MsgType
=
1201
}
type
TsMsg
interface
{
SetTs
(
ts
Timestamp
)
BeginTs
()
Timestamp
EndTs
()
Timestamp
Type
()
MsgType
Marshal
(
*
TsMsg
)
[]
byte
Unmarshal
([]
byte
)
*
TsMsg
}
type
MsgPack
struct
{
BeginTs
Timestamp
EndTs
Timestamp
Msgs
[]
TsMsg
}
type
MsgStream
interface
{
Produce
(
*
MsgPack
)
error
Broadcast
(
*
MsgPack
)
error
Consume
()
*
MsgPack
// message can be consumed exactly once
}
type
RepackFunc
(
msgs
[]
*
TsMsg
,
hashKeys
[][]
int32
)
map
[
int32
]
*
MsgPack
type
PulsarMsgStream
struct
{
client
*
pulsar
.
Client
repackFunc
RepackFunc
producers
[]
*
pulsar
.
Producer
consumers
[]
*
pulsar
.
Consumer
unmarshal
*
UnmarshalDispatcher
}
func
(
ms
*
PulsarMsgStream
)
CreatePulsarProducers
(
topics
[]
string
)
func
(
ms
*
PulsarMsgStream
)
CreatePulsarConsumers
(
subname
string
,
topics
[]
string
,
unmarshal
*
UnmarshalDispatcher
)
func
(
ms
*
PulsarMsgStream
)
SetRepackFunc
(
repackFunc
RepackFunc
)
func
(
ms
*
PulsarMsgStream
)
Produce
(
msgs
*
MsgPack
)
error
func
(
ms
*
PulsarMsgStream
)
Broadcast
(
msgs
*
MsgPack
)
error
func
(
ms
*
PulsarMsgStream
)
Consume
()
(
*
MsgPack
,
error
)
func
(
ms
*
PulsarMsgStream
)
Start
()
error
func
(
ms
*
PulsarMsgStream
)
Close
()
error
func
NewPulsarMsgStream
(
ctx
context
.
Context
,
pulsarAddr
string
)
*
PulsarMsgStream
type
PulsarTtMsgStream
struct
{
client
*
pulsar
.
Client
repackFunc
RepackFunc
producers
[]
*
pulsar
.
Producer
consumers
[]
*
pulsar
.
Consumer
unmarshal
*
UnmarshalDispatcher
inputBuf
[]
*
TsMsg
unsolvedBuf
[]
*
TsMsg
msgPacks
[]
*
MsgPack
}
func
(
ms
*
PulsarTtMsgStream
)
CreatePulsarProducers
(
topics
[]
string
)
func
(
ms
*
PulsarTtMsgStream
)
CreatePulsarConsumers
(
subname
string
,
topics
[]
string
,
unmarshal
*
UnmarshalDispatcher
)
func
(
ms
*
PulsarTtMsgStream
)
SetRepackFunc
(
repackFunc
RepackFunc
)
func
(
ms
*
PulsarTtMsgStream
)
Produce
(
msgs
*
MsgPack
)
error
func
(
ms
*
PulsarTtMsgStream
)
Broadcast
(
msgs
*
MsgPack
)
error
func
(
ms
*
PulsarTtMsgStream
)
Consume
()
*
MsgPack
//return messages in one time tick
func
(
ms
*
PulsarTtMsgStream
)
Start
()
error
func
(
ms
*
PulsarTtMsgStream
)
Close
()
error
func
NewPulsarTtMsgStream
(
ctx
context
.
Context
,
pulsarAddr
string
)
*
PulsarTtMsgStream
```
```
go
type
MarshalFunc
func
(
*
TsMsg
)
[]
byte
type
UnmarshalFunc
func
([]
byte
)
*
TsMsg
type
UnmarshalDispatcher
struct
{
tempMap
map
[
ReqType
]
UnmarshalFunc
}
func
(
dispatcher
*
MarshalDispatcher
)
Unmarshal
([]
byte
)
*
TsMsg
func
(
dispatcher
*
MarshalDispatcher
)
AddMsgTemplate
(
msgType
MsgType
,
marshal
MarshalFunc
)
func
(
dispatcher
*
MarshalDispatcher
)
addDefaultMsgTemplates
()
func
NewUnmarshalDispatcher
()
*
UnmarshalDispatcher
```
#### A.4 Time Ticked Flow Graph
###### A.4.1 Flow Graph States
...
...
docs/developer_guides/chap03_index_builder.md
浏览文件 @
c82565bd
...
...
@@ -6,7 +6,7 @@
#### 8.1 Overview
<img
src=
"./figs/index_service.jpeg"
width=
700
>
#### 8.2 API
...
...
docs/developer_guides/chap04_message_stream.md
浏览文件 @
c82565bd
...
...
@@ -18,8 +18,6 @@ type Client interface {
}
```
*
*CreateChannels*
```
go
...
...
@@ -50,3 +48,109 @@ type ChannelDescriptions struct {
}
```
#### A.3 Message Stream
```
go
type
MsgType
uint32
const
{
kInsert
MsgType
=
400
kDelete
MsgType
=
401
kSearch
MsgType
=
500
KSearchResult
MsgType
=
1000
kSegStatistics
MsgType
=
1100
kTimeTick
MsgType
=
1200
kTimeSync
MsgType
=
1201
}
type
TsMsg
interface
{
SetTs
(
ts
Timestamp
)
BeginTs
()
Timestamp
EndTs
()
Timestamp
Type
()
MsgType
Marshal
(
*
TsMsg
)
[]
byte
Unmarshal
([]
byte
)
*
TsMsg
}
type
MsgPack
struct
{
BeginTs
Timestamp
EndTs
Timestamp
Msgs
[]
TsMsg
}
type
MsgStream
interface
{
Produce
(
*
MsgPack
)
error
Broadcast
(
*
MsgPack
)
error
Consume
()
*
MsgPack
// message can be consumed exactly once
}
type
RepackFunc
(
msgs
[]
*
TsMsg
,
hashKeys
[][]
int32
)
map
[
int32
]
*
MsgPack
type
PulsarMsgStream
struct
{
client
*
pulsar
.
Client
repackFunc
RepackFunc
producers
[]
*
pulsar
.
Producer
consumers
[]
*
pulsar
.
Consumer
unmarshal
*
UnmarshalDispatcher
}
func
(
ms
*
PulsarMsgStream
)
CreatePulsarProducers
(
topics
[]
string
)
func
(
ms
*
PulsarMsgStream
)
CreatePulsarConsumers
(
subname
string
,
topics
[]
string
,
unmarshal
*
UnmarshalDispatcher
)
func
(
ms
*
PulsarMsgStream
)
SetRepackFunc
(
repackFunc
RepackFunc
)
func
(
ms
*
PulsarMsgStream
)
Produce
(
msgs
*
MsgPack
)
error
func
(
ms
*
PulsarMsgStream
)
Broadcast
(
msgs
*
MsgPack
)
error
func
(
ms
*
PulsarMsgStream
)
Consume
()
(
*
MsgPack
,
error
)
func
(
ms
*
PulsarMsgStream
)
Start
()
error
func
(
ms
*
PulsarMsgStream
)
Close
()
error
func
NewPulsarMsgStream
(
ctx
context
.
Context
,
pulsarAddr
string
)
*
PulsarMsgStream
type
PulsarTtMsgStream
struct
{
client
*
pulsar
.
Client
repackFunc
RepackFunc
producers
[]
*
pulsar
.
Producer
consumers
[]
*
pulsar
.
Consumer
unmarshal
*
UnmarshalDispatcher
inputBuf
[]
*
TsMsg
unsolvedBuf
[]
*
TsMsg
msgPacks
[]
*
MsgPack
}
func
(
ms
*
PulsarTtMsgStream
)
CreatePulsarProducers
(
topics
[]
string
)
func
(
ms
*
PulsarTtMsgStream
)
CreatePulsarConsumers
(
subname
string
,
topics
[]
string
,
unmarshal
*
UnmarshalDispatcher
)
func
(
ms
*
PulsarTtMsgStream
)
SetRepackFunc
(
repackFunc
RepackFunc
)
func
(
ms
*
PulsarTtMsgStream
)
Produce
(
msgs
*
MsgPack
)
error
func
(
ms
*
PulsarTtMsgStream
)
Broadcast
(
msgs
*
MsgPack
)
error
func
(
ms
*
PulsarTtMsgStream
)
Consume
()
*
MsgPack
//return messages in one time tick
func
(
ms
*
PulsarTtMsgStream
)
Start
()
error
func
(
ms
*
PulsarTtMsgStream
)
Close
()
error
func
NewPulsarTtMsgStream
(
ctx
context
.
Context
,
pulsarAddr
string
)
*
PulsarTtMsgStream
```
```
go
type
MarshalFunc
func
(
*
TsMsg
)
[]
byte
type
UnmarshalFunc
func
([]
byte
)
*
TsMsg
type
UnmarshalDispatcher
struct
{
tempMap
map
[
ReqType
]
UnmarshalFunc
}
func
(
dispatcher
*
MarshalDispatcher
)
Unmarshal
([]
byte
)
*
TsMsg
func
(
dispatcher
*
MarshalDispatcher
)
AddMsgTemplate
(
msgType
MsgType
,
marshal
MarshalFunc
)
func
(
dispatcher
*
MarshalDispatcher
)
addDefaultMsgTemplates
()
func
NewUnmarshalDispatcher
()
*
UnmarshalDispatcher
```
docs/developer_guides/chap05_proxy.md
浏览文件 @
c82565bd
...
...
@@ -2,6 +2,12 @@
## 6. Proxy
<img
src=
"./figs/proxy.jpeg"
width=
700
>
#### 6.0 Proxy Service API
```
go
...
...
@@ -28,8 +34,6 @@ type Client interface {
#### 6.1 Proxy Instance
```
go
...
...
docs/developer_guides/chap06_master.md
浏览文件 @
c82565bd
...
...
@@ -2,7 +2,8 @@
## 10. Master
,
<img
src=
"./figs/master.jpeg"
width=
700
>
#### 10.1 API
...
...
@@ -28,8 +29,6 @@ type Client interface {
#### 10.1 Interfaces (RPC)
| RPC | description |
...
...
docs/developer_guides/chap07_query_service.md
浏览文件 @
c82565bd
...
...
@@ -6,6 +6,8 @@
#### 8.1 Overview
<img
src=
"./figs/query_service.jpeg"
width=
700
>
#### 8.2 API
...
...
@@ -120,6 +122,28 @@ type ReleasePartitionRequest struct {
#### 8.2 Query Node
```
go
type
QueryNode
interface
{
Start
()
error
Close
()
error
AddQueryStream
(
requestStream
MsgStream
,
resultStream
MsgStream
)
error
RemoveQueryStream
(
requestStreamID
string
)
error
WatchDmStreams
(
insertStreams
MsgStream
)
error
WatchDdStream
(
stream
MsgStream
)
error
SetTimeTickStream
(
stream
MsgStream
)
error
SetStatsStream
(
stream
MsgStream
)
error
LoadSegments
(
DbID
UniqueID
,
CollID
UniqueID
,
PartitionID
UniqueID
,
SegIDs
[]
UniqueID
,
FieldIDs
[]
int64
)
error
ReleaseSegments
(
DbID
UniqueID
,
CollID
UniqueID
,
PartitionID
UniqueID
,
SegIDs
[]
UniqueID
)
error
DescribeParition
(
DbID
UniqueID
,
CollID
UniqueID
,
PartitionID
UniqueID
)
(
PartitionDescription
,
error
)
}
```
#### 8.2 Collection Replica
...
...
docs/developer_guides/chap09_data_service.md
浏览文件 @
c82565bd
...
...
@@ -6,6 +6,7 @@
#### 8.1 Overview
<img
src=
"./figs/data_service.jpeg"
width=
700
>
#### 8.2 API
...
...
docs/developer_guides/figs/data_service.jpeg
0 → 100644
浏览文件 @
c82565bd
1.5 MB
docs/developer_guides/figs/index_service.jpeg
0 → 100644
浏览文件 @
c82565bd
1.5 MB
docs/developer_guides/figs/local_distributed_cloud.jpeg
0 → 100644
浏览文件 @
c82565bd
1.5 MB
docs/developer_guides/figs/master.jpeg
0 → 100644
浏览文件 @
c82565bd
1.7 MB
docs/developer_guides/figs/proxy.jpeg
0 → 100644
浏览文件 @
c82565bd
1.6 MB
docs/developer_guides/figs/query_service.jpeg
0 → 100644
浏览文件 @
c82565bd
1.5 MB
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录