Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
make format
Browse files Browse the repository at this point in the history
  • Loading branch information
jdef committed Aug 10, 2015
1 parent d1d55f8 commit 8a4f76b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions records/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,11 +376,11 @@ func (rg *RecordGenerator) taskRecords(sj state.State, domain string, spec label
canonical := ctx.taskName + "-" + ctx.taskID + "-" + ctx.slaveID + "." + fname
arec := ctx.taskName + "." + fname

rg.insertRR(arec + tail, ctx.taskIP, "A")
rg.insertRR(canonical + tail, ctx.taskIP, "A")
rg.insertRR(arec+tail, ctx.taskIP, "A")
rg.insertRR(canonical+tail, ctx.taskIP, "A")

rg.insertRR(arec + ".slave" + tail, ctx.slaveIP, "A")
rg.insertRR(canonical + ".slave" + tail, ctx.slaveIP, "A")
rg.insertRR(arec+".slave"+tail, ctx.slaveIP, "A")
rg.insertRR(canonical+".slave"+tail, ctx.slaveIP, "A")

// Add RFC 2782 SRV records
slaveHost := canonical + ".slave" + tail
Expand All @@ -390,12 +390,12 @@ func (rg *RecordGenerator) taskRecords(sj state.State, domain string, spec label
slaveTarget := slaveHost + ":" + port

if !task.HasDiscoveryInfo() {
rg.insertRR(tcpName + tail, slaveTarget, "SRV")
rg.insertRR(udpName + tail, slaveTarget, "SRV")
rg.insertRR(tcpName+tail, slaveTarget, "SRV")
rg.insertRR(udpName+tail, slaveTarget, "SRV")
}

rg.insertRR(tcpName + ".slave" + tail, slaveTarget, "SRV")
rg.insertRR(udpName + ".slave" + tail, slaveTarget, "SRV")
rg.insertRR(tcpName+".slave"+tail, slaveTarget, "SRV")
rg.insertRR(udpName+".slave"+tail, slaveTarget, "SRV")
}

if !task.HasDiscoveryInfo() {
Expand All @@ -409,10 +409,10 @@ func (rg *RecordGenerator) taskRecords(sj state.State, domain string, spec label
proto := spec(port.Protocol)
if proto != "" {
name := "_" + ctx.taskName + "._" + proto + "." + fname
rg.insertRR(name + tail, target, "SRV")
rg.insertRR(name+tail, target, "SRV")
} else {
rg.insertRR(tcpName + tail, target, "SRV")
rg.insertRR(udpName + tail, target, "SRV")
rg.insertRR(tcpName+tail, target, "SRV")
rg.insertRR(udpName+tail, target, "SRV")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion records/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ func validateIPSources(srcs []string) error {
}

return nil
}
}

0 comments on commit 8a4f76b

Please sign in to comment.