-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e99c0ac
commit a0bf236
Showing
32 changed files
with
922 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
local base = import "base/base.jsonnet"; | ||
local images = import "values/images.jsonnet"; | ||
|
||
{ | ||
|
||
minio +: { | ||
|
||
create:: function(engine) | ||
|
||
local vol = engine.volume("minio-data").with_size("20G"); | ||
|
||
local container = | ||
engine.container("minio") | ||
.with_image(images.minio) | ||
.with_command([ | ||
"minio", | ||
"server", | ||
"/minio_data", | ||
"--console-address", | ||
":9001", | ||
]) | ||
.with_environment({ | ||
MINIO_ROOT_USER: "minioadmin", | ||
MINIO_ROOT_PASSWORD: "minioadmin", | ||
}) | ||
.with_limits("0.5", "128M") | ||
.with_reservations("0.25", "128M") | ||
.with_port(9000, 9000, "api") | ||
.with_port(9001, 9001, "console") | ||
.with_volume_mount(vol, "/minio_data"); | ||
|
||
local containerSet = engine.containers( | ||
"etcd", [ container ] | ||
); | ||
|
||
local service = | ||
engine.service(containerSet) | ||
.with_port(9000, 9000, "api") | ||
.with_port(9001, 9001, "console"); | ||
|
||
engine.resources([ | ||
vol, | ||
containerSet, | ||
service, | ||
]) | ||
|
||
}, | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,6 @@ class LlmError(Exception): | |
class ParseError(Exception): | ||
pass | ||
|
||
class RequestError(Exception): | ||
pass | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,6 @@ | |
from . metadata import * | ||
from . agent import * | ||
from . lookup import * | ||
from . library import * | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
|
||
from pulsar.schema import Record, Bytes, String, Array | ||
from . types import Triple | ||
from . topic import topic | ||
from . types import Error | ||
from . metadata import Metadata | ||
from . documents import Document, TextDocument | ||
|
||
# add(Metadata, Bytes) : error? | ||
# copy(id, user, collection) | ||
# move(id, user, collection) | ||
# delete(id) | ||
# get(id) : Bytes | ||
# reindex(id) | ||
# list(user, collection) : id[] | ||
# info(id[]) : DocumentInfo[] | ||
# search(<key,op,value>[]) : id[] | ||
|
||
class DocumentPackage(Record): | ||
metadata = Array(Triple()) | ||
document = Bytes() | ||
kind = String() | ||
user = String() | ||
collection = String() | ||
|
||
class DocumentInfo(Record): | ||
metadata = Array(Triple()) | ||
kind = String() | ||
user = String() | ||
collection = String() | ||
|
||
class Criteria(Record): | ||
key = String() | ||
value = String() | ||
operator = String() | ||
|
||
class LibrarianRequest(Record): | ||
operation = String() | ||
id = String() | ||
document = DocumentPackage() | ||
user = String() | ||
collection = String() | ||
criteria = Array(Criteria()) | ||
|
||
class LibrarianResponse(Record): | ||
error = Error() | ||
document = DocumentPackage() | ||
info = Array(DocumentInfo()) | ||
|
||
librarian_request_queue = topic( | ||
'librarian', kind='non-persistent', namespace='request' | ||
) | ||
librarian_response_queue = topic( | ||
'librarian', kind='non-persistent', namespace='response', | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env python3 | ||
|
||
from trustgraph.librarian import run | ||
|
||
run() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.