Documentation ¶
Overview ¶
Copyright 2022 KentikLabs
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2022 KentikLabs ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- type Agent
- type Client
- func (c *Client) Agents(ctx context.Context) ([]*Agent, error)
- func (c *Client) AuthorizeAgent(ctx context.Context, agentID, agentName, siteID string) error
- func (c *Client) CreateTest(ctx context.Context, t *Test) (*Test, error)
- func (c *Client) DeleteAgent(ctx context.Context, agentID string) error
- func (c *Client) DeleteTest(ctx context.Context, testID string) error
- func (c *Client) GetAgent(ctx context.Context, name string) (*Agent, error)
- func (c *Client) GetSite(ctx context.Context, name string) (*Site, error)
- func (c *Client) GetUser(ctx context.Context, email string) (*User, error)
- func (c *Client) Tests(ctx context.Context) ([]*Test, error)
- func (c *Client) UpdateTest(ctx context.Context, t *Test, updateFields []string) error
- type DNSTest
- type PageLoadTest
- type PingTest
- type Site
- type Test
- type TestAgent
- type TestDNSGrid
- type TestFlow
- type TestHealthSettings
- type TestHostname
- type TestIP
- type TestNetworkGrid
- type TestSettings
- type TestSite
- type TestTag
- type TraceTest
- type URLTest
- type User
Constants ¶
const ( // Agent Status AgentStatusOK = "AGENT_STATUS_OK" IPFamilyV4 = "IP_FAMILY_V4" )
const ( // Test Types TestTypeURL = "url" TestTypeIP = "ip" // Test Status TestStatusActive = "TEST_STATUS_ACTIVE" TestStatusPaused = "TEST_STATUS_PAUSED" // Test Tasks TestTaskHTTP = "http" TestTaskTrace = "traceroute" TestTaskPing = "ping" // Test IP Family TestIPFamilyV4 = "IP_FAMILY_V4" TestIPFamilyV6 = "IP_FAMILY_V6" TestIPFamilyDual = "IP_FAMILY_DUAL" // Test Protocol TestProtocolTCP = "tcp" TestProtocolUDP = "udp" TestProtocolICMP = "icmp" )
Variables ¶
var (
ErrAgentNotFound = errors.New("agent not found")
)
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Status string `json:"status,omitempty"` Alias string `json:"alias,omitempty"` Type string `json:"type,omitempty"` OS string `json:"os,omitempty"` IP string `json:"ip,omitempty"` SiteID string `json:"site_id,omitempty"` SiteName string `json:"site_name,omitempty"` Version string `json:"version,omitempty"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AuthorizeAgent ¶
func (*Client) CreateTest ¶
func (*Client) DeleteAgent ¶
type PageLoadTest ¶
type Test ¶
type Test struct { ID string `json:"id,omitempty"` Name string `json:"name"` Type string `json:"type"` Status string `json:"status"` Settings *TestSettings `json:"settings"` }
type TestDNSGrid ¶
type TestHealthSettings ¶
type TestHealthSettings struct { LatencyCritical float64 `json:"latencyCritical,omitempty"` LatencyWarning float64 `json:"latencyWarning,omitempty"` PacketLossCritical float64 `json:"packetLossCritical,omitempty"` PacketLossWarning float64 `json:"packetLossWarning,omitempty"` JitterCritical float64 `json:"jitterCritical,omitempty"` JitterWarning float64 `json:"jitterWarning,omitempty"` HTTPLatencyCritical float64 `json:"httpLatencyCritical,omitempty"` HTTPLatencyWarning float64 `json:"httpLatencyWarning,omitempty"` HTTPValidCodes []int `json:"httpValidCodes,omitempty"` DNSValidCodes []int `json:"dnsValidCodes,omitempty"` LatencyCriticalStdDev float64 `json:"latencyCriticalStddev,omitempty"` LatencyWarningStdDev float64 `json:"latencyWarningStddev,omitempty"` JitterCriticalStdDev float64 `json:"jitterCriticalStddev,omitempty"` JitterWarningStdDev float64 `json:"jitterWarningStddev,omitempty"` UnhealthySubtestThreshold float64 `json:"unhealthySubtestThreshold,omitempty"` HTTPLatencyCriticalStdDev float64 `json:"httpLatencyCriticalStddev,omitempty"` HTTPLatencyWarningStdDev float64 `json:"httpWarningCriticalStddev,omitempty"` }
type TestHostname ¶
type TestHostname struct {
Target string `json:"target"`
}
type TestNetworkGrid ¶
type TestNetworkGrid struct {
Targets []string `json:"targets"`
}
type TestSettings ¶
type TestSettings struct { Hostname *TestHostname `json:"hostname,omitempty"` IP *TestIP `json:"ip,omitempty"` Agent *TestAgent `json:"agent,omitempty"` Flow *TestFlow `json:"flow,omitempty"` Site *TestSite `json:"site,omitempty"` Tag *TestTag `json:"tag,omitempty"` DNS *DNSTest `json:"dns,omitempty"` URL *URLTest `json:"url,omitempty"` NetworkGrid *TestNetworkGrid `json:"networkGrid,omitempty"` PageLoad *PageLoadTest `json:"pageLoad,omitempty"` DNSGrid *TestDNSGrid `json:"dnsGrid,omitempty"` AgentIDs []string `json:"agentIds,omitempty"` Period int `json:"period,omitempty"` Tasks []string `json:"tasks,omitempty"` HealthSettings *TestHealthSettings `json:"healthSettings,omitempty"` Ping *PingTest `json:"ping,omitempty"` Trace *TraceTest `json:"trace,omitempty"` Port int `json:"port,omitempty"` Protocol string `json:"protocol,omitempty"` Family string `json:"family,omitempty"` Servers []string `json:"servers,omitempty"` UseLocalIP bool `json:"useLocalIp,omitempty"` Reciprocal bool `json:"reciprocal,omitempty"` }
type URLTest ¶
type URLTest struct { Target string `json:"target,omitempty"` Timeout float64 `json:"timeout"` Method string `json:"method,omitempty"` Headers map[string]string `json:"headers,omitempty"` Body string `json:"body,omitempty"` CSSSelectors map[string]string `json:"cssSelectors,omitempty"` IgnoreTLSErrors bool `json:"ignoreTlsErrors,omitempty"` Expiry int `json:"expiry,omitempty"` }