Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromConsulKV ¶
FromConsulKV fetches a resource from a Consul key/value store; the URL must contain the scheme (consulkv://, "consulkvs://" for TLS API calls, or "consulkvs-://" to skip TLS certificate verification), optional authentication info either as basic HTTP auth (in the form consulkv://<username>:<password>@consul.example.com:8200) or as a token (in the form consulkv://:token@consul.example.com:8201), the name of the host or its IP address and the optional port; the query string can specify a datacenter ("dc") and must specify the key under which the bundle is stored ("key"); all in all, the URL looks something like the following:
consulkv://username:password@consul.example.com:8200?dc=myDC&key=my_key
or
consulkvs-://:token@redis.example.com:8200?dc=myDC&key=/path/to/my/my_key
func FromConsulSR ¶
FromConsulSR fetches a resource from a Consul service registry; the URL must contain the scheme (consulsr://, "consulsrs://" for TLS API calls, or "consulsrs-://" to skip TLS certificate verification), optional authentication info either as basic HTTP auth (in the form consulsr://<username>:<password>@consul.example.com:8200) or as a token (in the form consulsr://:token@consul.example.com:8201), the name of the host or its IP address and the optional port; the query string can specify a datacenter ("dc") and must specify the service under which the bundle is stored ("service") and the name of the metadata key ("meta"), and can specify a tag ("tag"), provided the query only returns a single result; all in all, the URL looks something like the following:
consulsr://username:password@consul.example.com:8200?dc=myDC&service=my_service&tag=my_tag&meta=my_key
or
consulsrs-://:token@redis.example.com:8200?dc=myDC&service=my_service&tag=my_tag&meta=my_key
func FromHTTP ¶
FromHTTP retrieves a bundle from an HTTP URL; the server must set the Content-Type header correctly in order to give the right hint about which parser to use to read and analyse the checks bundle. If the URL has the "https-://" scheme, the certificate verification is skipped.
func FromRedis ¶
FromRedis fetches a resource from a Redis service; the URL must contain the scheme (one of redis:// and rediss://), optional authentication info (in the form redis://<username>:<password>@host:6379), the name of the host or its IP address and the optional port; the query string can specify a db (if not the default, which is assumed to be 0) and the key under which the bundle is stored; all in all, the URL looks something like the following:
redis://username:password@redis.example.com:6379?db=5&key=my_key
or
rediss://redis.example.com:6379?db=3&key=/path/to/my/my_key
Types ¶
This section is empty.