Skip to content

Commit

Permalink
session: expose the ProbeASN as an integer (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
bassosimone authored Oct 2, 2019
1 parent ddc9bae commit 20fcd34
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,16 @@ func (s *Session) AddAvailableHTTPSCollector(baseURL string) {

// ProbeASNString returns the probe ASN as a string.
func (s *Session) ProbeASNString() string {
return fmt.Sprintf("AS%d", s.ProbeASN())
}

// ProbeASN returns the probe ASN as an integer.
func (s *Session) ProbeASN() uint {
asn := model.DefaultProbeASN
if s.location != nil {
asn = s.location.ASN
}
return fmt.Sprintf("AS%d", asn)
return asn
}

// ProbeCC returns the probe CC.
Expand Down

0 comments on commit 20fcd34

Please sign in to comment.