Note that the string type related to time (i.e. timeout, idleConnTimeout, expirationTime) is decimal numbers, each with optional fraction and a unit suffix, such as “300ms”, “1.5h” or “2h45m”. Valid time units are “ns”, “us”, “ms”, “s”, “m”, “h”.
gRPC Gateway exposes the client’s gRPC API to manage user’s devices.
docker pull ghcr.io/plgd-dev/hub/grpc-gateway:latest
A configuration template is available on grpc-gateway/config.yaml.
Property | Type | Description | Default |
---|---|---|---|
log.level | string | Logging enabled from level. | "info" |
log.encoding | string | Logging format. The supported values are: "json", "console" | "json" |
log.stacktrace.enabled | bool | Log stacktrace. | false |
log.stacktrace.level | string | Stacktrace from level. | "warn" |
log.encoderConfig.timeEncoder | string | Time format for logs. The supported values are: "rfc3339nano", "rfc3339". | "rfc3339nano" |
gRPC API of the gRPC Gateway service as defined here.
Property | Type | Description | Default |
---|---|---|---|
apis.grpc.address | string | Listen specification <host>:<port> for grpc client connection. | "0.0.0.0:9100" |
apis.grpc.ownerCacheExpiration | string | Time limit of how long to keep subscribed to device updates after last use of the given cache item. | 1m |
apis.grpc.subscriptionBufferSize | int | The maximum buffer size for one events subscription. | 1000 |
apis.grpc.enforcementPolicy.minTime | string | The minimum amount of time a client should wait before sending a keepalive ping. Otherwise the server close connection. | 5s |
apis.grpc.enforcementPolicy.permitWithoutStream | bool | If true, server allows keepalive pings even when there are no active streams(RPCs). Otherwise the server close connection. | true |
apis.grpc.keepAlive.maxConnectionIdle | string | A duration for the amount of time after which an idle connection would be closed by sending a GoAway. 0s means infinity. | 0s |
apis.grpc.keepAlive.maxConnectionAge | string | A duration for the maximum amount of time a connection may exist before it will be closed by sending a GoAway. 0s means infinity. | 0s |
apis.grpc.keepAlive.maxConnectionAgeGrace | string | An additive period after MaxConnectionAge after which the connection will be forcibly closed. 0s means infinity. | 0s |
apis.grpc.keepAlive.time | string | After a duration of this time if the server doesn't see any activity it pings the client to see if the transport is still alive. | 2h |
apis.grpc.keepAlive.timeout | string | After having pinged for keepalive check, the client waits for a duration of Timeout and if no activity is seen even after that the connection is closed. | 20s |
apis.grpc.tls.caPool | []string | File paths to the root certificates in PEM format. The file may contain multiple certificates. | [] |
apis.grpc.tls.keyFile | string | File path to private key in PEM format. | "" |
apis.grpc.tls.certFile | string | File path to certificate in PEM format. | "" |
apis.grpc.tls.clientCertificateRequired | bool | If true, require client certificate. | true |
apis.grpc.authorization.ownerClaim | string | Claim used to identify owner of the device. | "sub" |
apis.grpc.authorization.authority | string | Authority is the address of the token-issuing authentication server. Services will use this URI to find and retrieve the public key that can be used to validate the token’s signature. | "" |
apis.grpc.authorization.audience | string | Identifier of the API configured in your OAuth provider. | "" |
apis.grpc.authorization.http.maxIdleConns | int | It controls the maximum number of idle (keep-alive) connections across all hosts. Zero means no limit. | 16 |
apis.grpc.authorization.http.maxConnsPerHost | int | It optionally limits the total number of connections per host, including connections in the dialing, active, and idle states. On limit violation, dials will block. Zero means no limit. | 32 |
apis.grpc.authorization.http.maxIdleConnsPerHost | int | If non-zero, controls the maximum idle (keep-alive) connections to keep per-host. If zero, DefaultMaxIdleConnsPerHost is used. | 16 |
apis.grpc.authorization.http.idleConnTimeout | string | The maximum amount of time an idle (keep-alive) connection will remain idle before closing itself. Zero means no limit. | 30s |
apis.grpc.authorization.http.timeout | string | A time limit for requests made by this Client. A Timeout of zero means no timeout. | 10s |
apis.grpc.authorization.http.tls.caPool | []string | File paths to the root certificates in PEM format. The file may contain multiple certificates. | [] |
apis.grpc.authorization.http.tls.keyFile | string | File path to private key in PEM format. | "" |
apis.grpc.authorization.http.tls.certFile | string | File path to certificate in PEM format. | "" |
apis.grpc.authorization.http.tls.useSystemCAPool | bool | If true, use system certification pool. | false |
Client configurations to internally connect to Identity Store service.
Property | Type | Description | Default |
---|---|---|---|
clients.identityStore.grpc.address | string | Identity Store service address. | "127.0.0.1:9100" |
clients.identityStore.grpc.tls.caPool | []string | File paths to the root certificates in PEM format. The file may contain multiple certificates. | [] |
clients.identityStore.grpc.tls.keyFile | string | File path to private key in PEM format. | "" |
clients.identityStore.grpc.tls.certFile | string | File path to certificate in PEM format. | "" |
clients.identityStore.grpc.tls.useSystemCAPool | bool | If true, use system certification pool. | false |
clients.identityStore.grpc.keepAlive.time | string | After a duration of this time if the client doesn't see any activity it pings the server to see if the transport is still alive. | 10s |
clients.identityStore.grpc.keepAlive.timeout | string | After having pinged for keepalive check, the client waits for a duration of Timeout and if no activity is seen even after that the connection is closed. | 20s |
clients.identityStore.grpc.keepAlive.permitWithoutStream | bool | If true, client sends keepalive pings even with no active RPCs. If false, when there are no active RPCs, Time and Timeout will be ignored and no keepalive pings will be sent. | false |
plgd hub uses NATS messaging system as a event bus.
Property | Type | Description | Default |
---|---|---|---|
clients.eventBus.goPoolSize | int | Number of routines to process events in projection. | 16 |
clients.eventBus.nats.url | string | URL to nats messaging system. | "nats://localhost:4222" |
clients.eventBus.nats.pendingLimits.msgLimit | int | Limit number of messages in queue. -1 means unlimited | 524288 |
clients.eventBus.nats.pendingLimits.bytesLimit | int | Limit buffer size of queue. -1 means unlimited | 67108864 |
clients.eventBus.nats.tls.caPool | []string | File paths to the root certificates in PEM format. The file may contain multiple certificates. | [] |
clients.eventBus.nats.tls.keyFile | string | File name of private key in PEM format. | "" |
clients.eventBus.nats.tls.certFile | string | File name of certificate in PEM format. | "" |
clients.eventBus.nats.tls.useSystemCAPool | bool | If true, use system certification pool. | false |
Client configurations to internally connect to Resource Aggregate service.
Property | Type | Description | Default |
---|---|---|---|
clients.resourceAggregate.grpc.address | string | Resource Aggregate service address. | "127.0.0.1:9100" |
clients.resourceAggregate.grpc.tls.caPool | []string | File paths to the root certificates in PEM format. The file may contain multiple certificates. | [] |
clients.resourceAggregate.grpc.tls.keyFile | string | File path to private key in PEM format. | "" |
clients.resourceAggregate.grpc.tls.certFile | string | File path to certificate in PEM format. | "" |
clients.resourceAggregate.grpc.tls.useSystemCAPool | bool | If true, use system certification pool. | false |
clients.resourceAggregate.grpc.keepAlive.time | string | After a duration of this time if the client doesn't see any activity it pings the server to see if the transport is still alive. | 10s |
clients.resourceAggregate.grpc.keepAlive.timeout | string | After having pinged for keepalive check, the client waits for a duration of Timeout and if no activity is seen even after that the connection is closed. | 20s |
clients.resourceAggregate.grpc.keepAlive.permitWithoutStream | bool | If true, client sends keepalive pings even with no active RPCs. If false, when there are no active RPCs, Time and Timeout will be ignored and no keepalive pings will be sent. | false |
Client configurations to internally connect to Resource Directory service.
Property | Type | Description | Default |
---|---|---|---|
clients.resourceDirectory.grpc.address | string | Resource Directory service address. | "127.0.0.1:9100" |
clients.resourceDirectory.grpc.tls.caPool | []string | File paths to the root certificates in PEM format. The file may contain multiple certificates. | [] |
clients.resourceDirectory.grpc.tls.keyFile | string | File path to private key in PEM format. | "" |
clients.resourceDirectory.grpc.tls.certFile | string | File path to certificate in PEM format. | "" |
clients.resourceDirectory.grpc.tls.useSystemCAPool | bool | If true, use system certification pool. | false |
clients.resourceDirectory.grpc.keepAlive.time | string | After a duration of this time if the client doesn't see any activity it pings the server to see if the transport is still alive. | 10s |
clients.resourceDirectory.grpc.keepAlive.timeout | string | After having pinged for keepalive check, the client waits for a duration of Timeout and if no activity is seen even after that the connection is closed. | 20s |
clients.resourceDirectory.grpc.keepAlive.permitWithoutStream | bool | If true, client sends keepalive pings even with no active RPCs. If false, when there are no active RPCs, Time and Timeout will be ignored and no keepalive pings will be sent. | false |
Note that the string type related to time (i.e. timeout, idleConnTimeout, expirationTime) is decimal numbers, each with optional fraction and a unit suffix, such as “300ms”, “1.5h” or “2h45m”. Valid time units are “ns”, “us”, “ms”, “s”, “m”, “h”.
plgd makes it simpler to build a successful IoT initiative – to create a proof of concept, evaluate, optimize, and scale.