Documentation ¶
Overview ¶
Copyright 2016 Gravitational, Inc.
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 2016 Gravitational, Inc.
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 2016 Gravitational, Inc.
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 2016 Gravitational, Inc.
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 2016 Gravitational, Inc.
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 2016 Gravitational, Inc.
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 2016 Gravitational, Inc.
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 2016 Gravitational, Inc.
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 2016 Gravitational, Inc.
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
- func ComponentStatusHealth(kubeAddr string) health.Checker
- func ConnectToKube(hostPort string) (*kube.Client, error)
- func DockerHealth(socketPath string) health.Checker
- func EtcdHealth(addr string) health.Checker
- func IntraPodCommunication(kubeAddr, nettestImage string) health.Checker
- func KubeApiServerHealth(kubeAddr string) health.Checker
- func KubeletHealth(addr string) health.Checker
- func NewComponentStatusChecker(hostPort string) health.Checker
- func NewHTTPHealthzChecker(name, URL string, checker HttpResponseChecker) health.Checker
- func NewIntraPodChecker(kubeAddr, nettestContainerImage string) health.Checker
- func NewProbeFromErr(name string, err error) *pb.Probe
- func NewSystemdChecker() systemdChecker
- func NewUnixSocketHealthzChecker(name, URL, socketPath string, checker HttpResponseChecker) health.Checker
- func SystemdHealth() health.Checker
- type HttpHealthzChecker
- type HttpResponseChecker
- type KubeChecker
- type KubeStatusChecker
- type SystemStatusType
Constants ¶
const ( SystemStatusRunning SystemStatusType = "running" SystemStatusDegraded = "degraded" SystemStatusLoading = "loading" SystemStatusStopped = "stopped" SystemStatusUnknown = "" )
Variables ¶
This section is empty.
Functions ¶
func ComponentStatusHealth ¶
ComponentStatusHealth creates a checker of the kubernetes component statuses
func ConnectToKube ¶
ConnectToKube establishes a connection to kubernetes on the specified address and returns an API client.
func DockerHealth ¶
DockerHealth creates a checker that checks health of the docker daemon under the specified socketPath
func EtcdHealth ¶
EtcdHealth creates a checker that checks health of etcd
func IntraPodCommunication ¶
IntraPodCommunication creates a checker that runs a network test in the cluster by scheduling pods and verifying the communication
func KubeApiServerHealth ¶
KubeApiServerHealth creates a checker for the kubernetes API server
func KubeletHealth ¶
KubeletHealth creates a checker for the kubernetes kubelet component
func NewComponentStatusChecker ¶
NewComponentStatusChecker returns a Checker that tests kubernetes component statuses
func NewHTTPHealthzChecker ¶
func NewHTTPHealthzChecker(name, URL string, checker HttpResponseChecker) health.Checker
NewHTTPHealthzChecker is a Checker that tests the specified HTTP endpoint
func NewIntraPodChecker ¶
NewIntraPodChecker returns an instance of intraPodChecker.
func NewProbeFromErr ¶
NewProbeFromErr creates a new Probe given an error and a checker name
func NewSystemdChecker ¶
func NewSystemdChecker() systemdChecker
func NewUnixSocketHealthzChecker ¶
func NewUnixSocketHealthzChecker(name, URL, socketPath string, checker HttpResponseChecker) health.Checker
NewUnixSocketHealthzChecker returns a new Checker that tests the specified unix domain socket path and URL
func SystemdHealth ¶
SystemdHealth creates a checker that reports the status of systemd units
Types ¶
type HttpHealthzChecker ¶
type HttpHealthzChecker struct { URL string // contains filtered or unexported fields }
HttpHealthzChecker is a health checker that can check servhice status over HTTP
func (*HttpHealthzChecker) Check ¶
func (r *HttpHealthzChecker) Check(reporter health.Reporter)
Check runs an HTTP check and reports errors to the specified Reporter
func (*HttpHealthzChecker) Name ¶
func (r *HttpHealthzChecker) Name() string
Name returns the name of this checker
type HttpResponseChecker ¶
HttpResponseChecker is a function that can validate service status from response
type KubeChecker ¶
type KubeChecker struct {
// contains filtered or unexported fields
}
KubeChecker implements Checker that can check and report problems with kubernetes services.
func (*KubeChecker) Check ¶
func (r *KubeChecker) Check(reporter health.Reporter)
Check runs the wrapped kubernetes service checker function and reports status to the specified reporter
func (*KubeChecker) Name ¶
func (r *KubeChecker) Name() string
Name returns the name of this checker
type KubeStatusChecker ¶
KubeStatusChecker is a function that can check status of kubernetes services.
type SystemStatusType ¶
type SystemStatusType string