Implement core functionality of AWS integration

This commit is contained in:
Maximilian Paß
2022-01-20 20:47:29 +01:00
parent dd41e0d5c4
commit 6123d20525
17 changed files with 360 additions and 157 deletions

View File

@ -32,6 +32,7 @@ var (
TemplateJobFile: "",
},
Nomad: Nomad{
Enabled: true,
Address: "127.0.0.1",
Port: 4646,
Token: "",
@ -43,6 +44,10 @@ var (
},
Namespace: "default",
},
AWS: AWS{
Enabled: false,
Endpoint: "",
},
Logger: logger{
Level: "INFO",
},
@ -76,6 +81,7 @@ func (s *server) URL() *url.URL {
// Nomad configures the used Nomad cluster.
type Nomad struct {
Enabled bool
Address string
Port int
Token string
@ -88,6 +94,12 @@ func (n *Nomad) URL() *url.URL {
return parseURL(n.Address, n.Port, n.TLS.Active)
}
// AWS configures the AWS Lambda usage.
type AWS struct {
Enabled bool
Endpoint string
}
// TLS configures TLS on a connection.
type TLS struct {
Active bool
@ -105,6 +117,7 @@ type logger struct {
type configuration struct {
Server server
Nomad Nomad
AWS AWS
Logger logger
Sentry sentry.ClientOptions
}