-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dockerfile and export simple api to send/receive messages #92
Conversation
@adambabik what was the idea for that api module? i see that some methods are using protocol directly. do you still want to use protocol interface there or we can make it a simple proxy to messenger? |
@@ -141,7 +141,8 @@ func (m *Messenger) Join(ctx context.Context, c Contact) error { | |||
} | |||
|
|||
opts := protocol.DefaultRequestOptions() | |||
if err := m.Request(ctx, c, opts); err != nil { | |||
// NOTE(dshulyak) join ctx shouldn't have an impact on history timeout. | |||
if err := m.Request(context.Background(), c, opts); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should remove sending a request when joining and make it a separate action? It wouldn't be this PR change though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think ideally it should be managed in background, so that we can do multiple attempts without blocking an API
the same when messenger is started
API.md
Outdated
Start service with configuration file that enables API: | ||
|
||
``` | ||
./bin/status-term-client -node-config api.conf -no-ui --keyhex=0x123 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's write the content of api.conf
here as well.
@@ -0,0 +1,23 @@ | |||
# Build status-go in a Go builder container |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also add a .dockerignore
and ignore .git
and other unnecessary dirs.
@dshulyak we can do whatever we want with the API module at this moment. There is a new one in status-go which will actually be used by status-react. So this API here can just expose |
Prepare docker image for tests Use make build in dockerfile Add mailservers to transport object Add readme with example how to use API Forgot to add a stream for contact Rewrite correct variable Apply suggestions
@adambabik i made suggested changes, please take a look |
Added dockerfile and set of api methods to send messages and query database
See https://github.com/status-im/status-console-client/blob/9fa939d7559a7bc629a272c09cf3b071cedb37e9/API.md
simple simulation example: status-im/status-scale#29