22
33Package etcd (and its subpackages) contain an etcd-based
44[ quota.Manager] ( https://github.com/google/trillian/blob/3cf59cdfd0/quota/quota.go#L101 )
5- implementation, with a corresponding REST-based configuration service.
5+ implementation, with a corresponding configuration service.
66
77## Usage
88
99First, ensure both ` logserver ` and ` logsigner ` are started with the
10- ` --etcd_servers ` and ` --quota_system=etcd ` flags, in addition to other flags.
11- ` logserver ` must also be started with a non-empty ` --http_endpoint ` flag, so the
12- REST quota API can be bound.
10+ ` --etcd_servers ` and ` --quota_system=etcd ` flags.
1311
1412For example:
1513
1614``` bash
1715trillian_log_server \
1816 --etcd_servers=... \
19- --http_endpoint =localhost:8091 \
17+ --rpc_endpoint =localhost:8090 \
2018 --quota_system=etcd
2119
2220trillian_log_signer --etcd_servers=... --quota_system=etcd
@@ -25,19 +23,14 @@ trillian_log_signer --etcd_servers=... --quota_system=etcd
2523If correctly started, the servers will be using etcd quotas. The default
2624configuration is empty, which means no quotas are enforced.
2725
28- The REST quota API may be used to create and update configurations.
26+ The quota API may be used to create and update configurations.
2927
3028For example, the command below creates a sequencing-based, ` global/write ` quota.
3129Assuming an expected sequencing performance of 50 QPS, the ` max_tokens `
3230specified below implies a backlog of 4h.
3331
3432``` bash
35- curl \
36- -d ' @-' \
37- -s \
38- -H ' Content-Type: application/json' \
39- -X POST \
40- ' localhost:8091/v1beta1/quotas/global/write/config' << EOF
33+ grpcurl -plaintext -d @ localhost:8090 v1beta1/quotas/global/write/config << EOF
4134{
4235 "name": "quotas/global/write/config",
4336 "config": {
5346To list all configured quotas, run:
5447
5548``` bash
56- curl ' localhost:8091/ v1beta1/quotas?view=FULL '
49+ grpcurl -plaintext -d ' {"view": "FULL"} ' localhost:8090 v1beta1/quotas
5750```
5851
5952Quotas may be retrieved individually or via a series of filters, updated and
60- deleted through the REST API as well. See
53+ deleted through the quota API as well. See
6154[ quotapb.proto] ( https://github.com/google/trillian/blob/master/quota/etcd/quotapb/quotapb.proto )
6255for an in-depth description of entities and available methods.
6356
0 commit comments