Compare commits
No commits in common. "main" and "feat/better-docker" have entirely different histories.
main
...
feat/bette
3 changed files with 12 additions and 9 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: bottin
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: golang:stretch
|
image: golang:stretch
|
||||||
|
@ -8,8 +12,14 @@ steps:
|
||||||
- go test -i -c -o test
|
- go test -i -c -o test
|
||||||
|
|
||||||
- name: test_bottin
|
- name: test_bottin
|
||||||
image: consul:1.15.4
|
image: consul:latest
|
||||||
environment:
|
environment:
|
||||||
BOTTIN_DEFAULT_ADMIN_PW: priZ4Cg0x5NkSyiIN/MpvWw4ZEy8f8s1
|
BOTTIN_DEFAULT_ADMIN_PW: priZ4Cg0x5NkSyiIN/MpvWw4ZEy8f8s1
|
||||||
commands:
|
commands:
|
||||||
- ash test/runner.sh
|
- ash test/runner.sh
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: signature
|
||||||
|
hmac: ff246a04c3df8a2f39c8b446dea920622d61950e6caaac886931bdb05d0706ed
|
||||||
|
|
||||||
|
...
|
|
@ -1,6 +1,6 @@
|
||||||
# Bottin
|
# Bottin
|
||||||
|
|
||||||
[![status-badge](https://woodpecker.deuxfleurs.fr/api/badges/38/status.svg)](https://woodpecker.deuxfleurs.fr/repos/38)
|
[![Build Status](https://drone.deuxfleurs.fr/api/badges/Deuxfleurs/bottin/status.svg?ref=refs/heads/main)](https://drone.deuxfleurs.fr/Deuxfleurs/bottin)
|
||||||
|
|
||||||
<img src="https://git.deuxfleurs.fr/Deuxfleurs/bottin/raw/branch/main/bottin.png" style="height: 150px; display: block; margin-left: auto; margin-right: auto" />
|
<img src="https://git.deuxfleurs.fr/Deuxfleurs/bottin/raw/branch/main/bottin.png" style="height: 150px; display: block; margin-left: auto; margin-right: auto" />
|
||||||
|
|
||||||
|
@ -87,7 +87,6 @@ suffix in the `suffix` key of the json config file.
|
||||||
|
|
||||||
By default, Bottin connects to the Consul server on localhost.
|
By default, Bottin connects to the Consul server on localhost.
|
||||||
Change this by specifying the `consul_host` key in the json config file.
|
Change this by specifying the `consul_host` key in the json config file.
|
||||||
You may need a `consul_token` to connect to the Consul server.
|
|
||||||
|
|
||||||
### Bind addresses
|
### Bind addresses
|
||||||
|
|
||||||
|
|
6
main.go
6
main.go
|
@ -40,7 +40,6 @@ type ConfigFile struct {
|
||||||
|
|
||||||
ConsulHost string `json:"consul_host"`
|
ConsulHost string `json:"consul_host"`
|
||||||
ConsulConsistent bool `json:"consul_force_consistency"`
|
ConsulConsistent bool `json:"consul_force_consistency"`
|
||||||
ConsulToken string `json:"consul_token"`
|
|
||||||
|
|
||||||
Acl []string `json:"acl"`
|
Acl []string `json:"acl"`
|
||||||
|
|
||||||
|
@ -57,7 +56,6 @@ type Config struct {
|
||||||
|
|
||||||
ConsulHost string
|
ConsulHost string
|
||||||
ConsulConsistent bool
|
ConsulConsistent bool
|
||||||
ConsulToken string
|
|
||||||
|
|
||||||
Acl ACL
|
Acl ACL
|
||||||
|
|
||||||
|
@ -116,7 +114,6 @@ func readConfig(logger *log.Logger) Config {
|
||||||
|
|
||||||
ConsulHost: config_file.ConsulHost,
|
ConsulHost: config_file.ConsulHost,
|
||||||
ConsulConsistent: config_file.ConsulConsistent,
|
ConsulConsistent: config_file.ConsulConsistent,
|
||||||
ConsulToken: config_file.ConsulToken,
|
|
||||||
|
|
||||||
Acl: acl,
|
Acl: acl,
|
||||||
}
|
}
|
||||||
|
@ -171,9 +168,6 @@ func main() {
|
||||||
if config.ConsulHost != "" {
|
if config.ConsulHost != "" {
|
||||||
consul_config.Address = config.ConsulHost
|
consul_config.Address = config.ConsulHost
|
||||||
}
|
}
|
||||||
if config.ConsulToken != "" {
|
|
||||||
consul_config.Token = config.ConsulToken
|
|
||||||
}
|
|
||||||
consul_client, err := consul.NewClient(consul_config)
|
consul_client, err := consul.NewClient(consul_config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Fatal(err)
|
logger.Fatal(err)
|
||||||
|
|
Loading…
Add table
Reference in a new issue