consular_agent_register_service: Register a new service to the local agent

Description Usage Arguments References Examples

Description

Register a new service to the local agent

Usage

1

Arguments

payload

list describing the service

References

https://www.consul.io/api/agent/service.html#register-service

Examples

 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)

daroczig/consular documentation built on May 9, 2019, 4:57 a.m.