Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EndpointConfig ¶
type EndpointConfig struct { URL string `json:"url"` // 目标 URL Method string `json:"method"` // HTTP 方法 Headers map[string]string `json:"headers"` // 请求头 Timeout int `json:"timeout"` // 超时时间(秒) ExpectedStatusCode int `json:"expectedStatusCode"` // 预期的 HTTP 状态码 StorageConfig store.StorageConfig `json:"storageConfig"` // 存储配置 JSONPathConfig *store.JSONPathConfig `json:"jsonPathConfig"` // JSONPath 配置 }
type Executor ¶
type Executor struct { store.StorageFactory // contains filtered or unexported fields }
Executor holds the HTTP client and provides methods for probing
func NewExecutor ¶
func NewExecutor(timeout int, factory store.StorageFactory) *Executor
NewExecutor creates a new Prober with the provided timeout
func (*Executor) Probe ¶
func (p *Executor) Probe(config EndpointConfig) error
Probe performs the HTTP request based on the provided configuration
type HttpProbeConfig ¶
type HttpProbeConfig struct { StartDelaySeconds int `json:"startDelaySeconds"` // 延迟启动时间(秒) Endpoints []EndpointConfig `json:"endpoints,omitempty"` // 多个端点的配置 ProbeIntervalSeconds int `json:"probeIntervalSeconds"` // 探测间隔时间(秒) }
type HttpProbeStatus ¶
type HttpProbeStatus struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.