Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

Document the api service #1915

Merged
merged 2 commits into from Jan 5, 2016
Merged

Document the api service #1915

merged 2 commits into from Jan 5, 2016

Conversation

yifan-gu
Copy link
Contributor

Also add a small example program shows how to using the api service.
And fixed a flag bug.

@yifan-gu
Copy link
Contributor Author

cc @derekparker @jonboulle @alban

@jonboulle
Copy link
Contributor

@yifan-gu yifan-gu force-pushed the doc_api_service branch 2 times, most recently from 999718c to 151839a Compare December 23, 2015 23:09
@jonboulle jonboulle added this to the v0.15.0 milestone Dec 24, 2015

The API service is designed to help users to get a well defined and structual result for listing and introspecting their pods and images.
The API service is implemented with [gRPC](http://www.grpc.io/).
The API service is designed not to be running as a root, thus it currently only provides read-only interfaces for now.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to:
"The API service is designed to run without root privileges, and currently provides a read-only interface."

@yifan-gu
Copy link
Contributor Author

@joshix Thanks, I updated.

## Running the API service

The API service is implemented by the `rkt api-service` command.
When started, it will listen on the URL that provided by `--listen-client-url` flag for the incoming gRPC requests.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/that//
s/by/by the/
s/the incoming/incoming/

@joshix
Copy link
Contributor

joshix commented Dec 28, 2015

@yifan-gu I found one 1.75 other nits that I missed on pass one. After that, LGTM.

@yifan-gu
Copy link
Contributor Author

@joshix Thanks for catching these :)

## Running the API service

The API service is implemented by the `rkt api-service` command.
When started, it will listen on the URL provided by the `--listen-client-url` flag for incoming gRPC requests.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API service listens for gRPC requests on all interfaces on the port specified by the --listen-port option. The default port is number 15441.

Or, with the proposed --listen:
The API service listens for gRPC requests on the address and port specified by the --listen option. The default is to listen on all interfaces on port number 15441, equivalent to invoking api-service --listen=0.0.0.0:15441.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joshix I feel we'd better listen on localhost by default so that it won't accept any incoming requests from outside by default?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes, good call. I have to agree.

So, to re-summarize and re-re-write this line:

The API service listens for gRPC requests on the address and port specified by the --listen option. The default is to listen on the loopback interface on port number 15441, equivalent to invoking rkt api-service --listen=127.0.0.1:15441. Specify the address 0.0.0.0 to listen on all interfaces.

@yifan-gu yifan-gu force-pushed the doc_api_service branch 3 times, most recently from f7663bb to 9c3c311 Compare December 29, 2015 00:39
## Using the API service

The interfaces are defined in the [protobuf here](../../api/v1alpha/api.proto).
Here is a small [Go program](../../api/v1alpha/client_example.go) that illustrates how to uses the API service.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/uses/use/

@yifan-gu
Copy link
Contributor Author

@joshix Updated according to your comments :)

@joshix
Copy link
Contributor

joshix commented Dec 29, 2015

I think this is a go. Thanks for sticking with it through so many revs.

@yifan-gu
Copy link
Contributor Author

@jonboulle Final call

yifan-gu added a commit that referenced this pull request Jan 5, 2016
@yifan-gu yifan-gu merged commit 019f36a into rkt:master Jan 5, 2016
@yifan-gu yifan-gu deleted the doc_api_service branch January 5, 2016 20:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants