github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/nomad/structs/config/sentinel.go (about) 1 package config 2 3 // SentinelConfig is configuration specific to Sentinel 4 type SentinelConfig struct { 5 // Imports are the configured imports 6 Imports []*SentinelImport `hcl:"import,expand"` 7 } 8 9 // SentinelImport is used per configured import 10 type SentinelImport struct { 11 Name string `hcl:",key"` 12 Path string `hcl:"path"` 13 Args []string `hcl:"args"` 14 } 15 16 // Merge is used to merge two Sentinel configs together. The settings from the input always take precedence. 17 func (a *SentinelConfig) Merge(b *SentinelConfig) *SentinelConfig { 18 result := *a 19 if len(b.Imports) > 0 { 20 result.Imports = append(result.Imports, b.Imports...) 21 } 22 return &result 23 }