Documentation
¶
Index ¶
- Constants
- func GeneratePrivKeyFile(fname string)
- func GetTLSConfig(caFile, certificateFile, privateKeyFile string) *tls.Config
- func PrintCertRequest(privfname, reqfname string) string
- func Runminion(cnc, caFile, certificateFile, privateKeyFile, reqFile, ver string) error
- type CombinedRequest
- type CombinedResult
- type CurlRequest
- type CurlResult
- type DNSRequest
- type DNSResult
- type IndividualDNSResult
- type MtrRequest
- type MtrResult
- type Pinger
- type Resolver
Constants ¶
View Source
const ( TypeDNS = 1 TypeMTR = 2 TypeCurl = 3 )
Variables ¶
This section is empty.
Functions ¶
func GeneratePrivKeyFile ¶
func GeneratePrivKeyFile(fname string)
func GetTLSConfig ¶
func PrintCertRequest ¶
Types ¶
type CombinedRequest ¶
type CombinedRequest struct {
Type int
Args interface{}
RequestedAt time.Time
AgentFilter []*big.Int
}
func (*CombinedRequest) Clone ¶
func (original *CombinedRequest) Clone() *CombinedRequest
Clone a CombinedRequest.. sort of deepcopy
type CombinedResult ¶
type CombinedResult struct {
Type int //Test type. 1=dns, 2=mtr, 3=curl
Result interface{} //DNSResult for dns, CurlResult for curl and MtrResult for mtr
CompletedAt time.Time //Time the test was completed
TimeTaken time.Duration //Time taken to run the test
TimeTakenStr string //Time taken to run the test in humanized form
Err string //Any error, typically at RPC level
Version string //The version of the minion that ran this test
Name string //The name assigned to this agent.
Agent string // /24 IP of the agent.
ASN *string //ASN of the agent.
ASName *string //ASN description of the agent.
Country string //Agent's country
State string //Agent's state
City string //Agent's city
Id *big.Int //Agent's ID - this is unique per agent
}
type CurlRequest ¶
type CurlResult ¶
type CurlResult struct {
Status int //HTTP status of result
Header http.Header //Headers
Remote string //Remote IP the connection was made to
Err string //Any Errors that happened. Usually for DNS fail or connection errors.
ErrEnglish string //Human friendly version of Err
Proto string //Response protocol
StatusStr string //Status in stringified form
DialTime time.Duration //Time it took for DNS + TCP connect.
DNSTime time.Duration //Time it took for DNS.
ConnectTime time.Duration //Time it took for TCP connect.
TLSTime time.Duration //Time it took for TLS handshake when running in SSL mode
Ttfb time.Duration //Time it took since sending GET and getting results : total time minus DialTime minus TLSTime
DialTimeStr string //Stringified
DNSTimeStr string //Stringified
ConnectTimeStr string //Stringified
TLSTimeStr string //Stringified
TtfbStr string //Stringified
ConnectionState *tls.ConnectionState //Additional TLS data when running test over https. We snip out PublicKey from the certs cause they dont serialize well.
}
func CurlImpl ¶
func CurlImpl(r *CurlRequest) *CurlResult
type DNSRequest ¶
type DNSRequest struct {
Host string //The DNS query
QType uint16 //Query type : https://en.wikipedia.org/wiki/List_of_DNS_record_types#Resource_records
Targets []string //The target nameservers
NoRecursion bool //true means RecursionDesired = false. false means RecursionDesired = true
AgentFilter []*big.Int
}
type DNSResult ¶
type DNSResult struct {
Results []IndividualDNSResult
Err string //Error with this test
}
func DNSImpl ¶
func DNSImpl(r *DNSRequest) *DNSResult
type IndividualDNSResult ¶
type IndividualDNSResult struct {
Server string //IP/hostname the query was sent to
Err string //Any error that occurred with this particular query.
ErrEnglish string //Human friendly version of Err
RttStr string //Round trip time in humanized form
Rtt time.Duration //Round trip time
Raw []byte //Raw packet
Formated string //Dig style formating
Msg *dns.Msg //Parsed DNS message
ASN *string //ASN of Server
ASName *string //ASN description
}
type MtrRequest ¶
type MtrResult ¶
type MtrResult struct {
Result *mtrparser.MTROutPut
Err string
ErrEnglish string //Human friendly version of Err
}
func MtrImpl ¶
func MtrImpl(r *MtrRequest) *MtrResult
type Resolver ¶
type Resolver struct {
Version string
}
func (*Resolver) Combined ¶
func (r *Resolver) Combined(req *CombinedRequest, out *CombinedResult) error
Click to show internal directories.
Click to hide internal directories.