Description Usage Arguments References Examples
Register a new service to the local agent
1 | consular_agent_register_service(payload)
|
payload |
list describing the service |
https://www.consul.io/api/agent/service.html#register-service
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ## Not run:
consular_agent_register_service(list(
Name = 'ssh',
ID = 'ssh-on-devbox',
Address = 'localhost',
Port = 22L
))
## also set a health-check eg for gRPC
port <- 35829
consular_agent_register_service(list(
Name = 'test-grpc',
ID = 'test-grpc-on-localhost',
Address = 'localhost',
Port = port,
Check = list(
id = 'test-grpc-health-check',
name = 'test-grpc health check',
grpc = paste('127.0.0.1', port, sep = ':'),
interval = '5s',
grpc_use_tls = FALSE,
service_id = 'test-grpc-on-localhost'
)
))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.