inspection

package
v0.0.1-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2021 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultInspectionInterval = 300 * time.Second
	DefaultInspectionPath     = ""
)
View Source
const (
	CruiseRequestAnno = "cruiseRequest"
	DefaultPrefix     = true
)
View Source
const (
	CruiseConsistencyAnno = "cruiseConsistency"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsistencyInfo

type ConsistencyInfo struct {
	Path     string `json:"path,omitempty"`
	Interval int    `json:"interval,omitempty"`
}

type RequestInfo

type RequestInfo struct {
	Path     string `json:"path,omitempty"`
	Interval int    `json:"interval,omitempty"`
	Prefix   bool   `json:"prefix,omitempty"`
}

type Server

type Server struct {
	Clientbuilder util.ClientBuilder
	// contains filtered or unexported fields
}

func (*Server) AddConsistencyTask

func (c *Server) AddConsistencyTask(cluster *kstoneapiv1.EtcdCluster, cruiseType string) error

AddConsistencyTask adds consistency inspection task

func (*Server) AddHealthyTask

func (c *Server) AddHealthyTask(cluster *kstoneapiv1.EtcdCluster, cruiseType string) error

AddHealthyTask adds etcdinspection for cheking the health of etcd

func (*Server) AddRequestTask

func (c *Server) AddRequestTask(cluster *kstoneapiv1.EtcdCluster, cruiseType string) error

AddRequestTask adds etcdinspection for request statistics

func (*Server) CollectEtcdClusterRequest

func (c *Server) CollectEtcdClusterRequest(inspection *kstoneapiv1.EtcdInspection) error

CollectEtcdClusterRequest collects request of etcd

func (*Server) CollectMemberConsistency

func (c *Server) CollectMemberConsistency(inspection *kstoneapiv1.EtcdInspection) error

CollectMemberConsistency collects the consistency info, and transfer them to prometheus metrics

func (*Server) CollectMemberHealthy

func (c *Server) CollectMemberHealthy(inspection *kstoneapiv1.EtcdInspection) error

CollectMemberHealthy collects the health of etcd, and transfer them to prometheus metrics

func (*Server) CreateEtcdInspection

func (c *Server) CreateEtcdInspection(inspection *kstoneapiv1.EtcdInspection) (*kstoneapiv1.EtcdInspection, error)

CreateEtcdInspection creates etcdinspection

func (*Server) GetEtcdCluster

func (c *Server) GetEtcdCluster(namespace, name string) (*kstoneapiv1.EtcdCluster, error)

GetEtcdCluster gets etcdcluster

func (*Server) GetEtcdClusterInfo

func (c *Server) GetEtcdClusterInfo(namespace, name string) (*kstoneapiv1.EtcdCluster, *transport.TLSInfo, error)

func (*Server) GetEtcdInspection

func (c *Server) GetEtcdInspection(namespace, name string) (*kstoneapiv1.EtcdInspection, error)

GetEtcdInspection gets etcdinspection

func (*Server) Init

func (c *Server) Init() error

Init inits the server of inspection

func (*Server) IsNotFound

func (c *Server) IsNotFound(cluster *kstoneapiv1.EtcdCluster, inspectionType string) bool

func (*Server) Watch

func (c *Server) Watch(cluster *kstoneapiv1.EtcdCluster, client *clientv3.Client, keyPrefix string) error

Watch watches etcd event

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL