componentstatus

package
v1.30.7 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 22 Imported by: 31

Documentation

Overview

Package componentstatus provides interfaces and implementation for retrieving cluster component status.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToConditionStatus

func ToConditionStatus(s probe.Result) api.ConditionStatus

Types

type EtcdServer added in v1.25.12

type EtcdServer struct {
	storagebackend.Config
}

func (*EtcdServer) DoServerCheck added in v1.25.12

func (server *EtcdServer) DoServerCheck() (probe.Result, string, error)

type HttpServer added in v1.25.12

type HttpServer struct {
	Addr        string
	Port        int
	Path        string
	EnableHTTPS bool
	TLSConfig   *tls.Config
	Validate    ValidatorFn
	Prober      httpprober.Prober
	Once        sync.Once
}

func (*HttpServer) DoServerCheck added in v1.25.12

func (server *HttpServer) DoServerCheck() (probe.Result, string, error)

type REST

type REST struct {
	GetServersToValidate func() map[string]Server
	rest.TableConvertor
}

func NewStorage

func NewStorage(serverRetriever func() map[string]Server) *REST

NewStorage returns a new REST.

func (*REST) Destroy added in v1.25.0

func (r *REST) Destroy()

Destroy cleans up resources on shutdown.

func (*REST) Get

func (rs *REST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)

func (*REST) GetSingularName added in v1.27.0

func (rs *REST) GetSingularName() string

func (*REST) List

Returns the list of component status. Note that the label and field are both ignored. Note that this call doesn't support labels or selectors.

func (*REST) NamespaceScoped added in v1.11.0

func (*REST) NamespaceScoped() bool

func (*REST) New

func (rs *REST) New() runtime.Object

func (*REST) NewList

func (rs *REST) NewList() runtime.Object

func (*REST) ShortNames added in v1.6.0

func (r *REST) ShortNames() []string

ShortNames implements the ShortNamesProvider interface. Returns a list of short names for a resource.

type Server added in v1.6.0

type Server interface {
	DoServerCheck() (probe.Result, string, error)
}

type ServerStatus added in v1.6.0

type ServerStatus struct {
	// +optional
	Component string `json:"component,omitempty"`
	// +optional
	Health string `json:"health,omitempty"`
	// +optional
	HealthCode probe.Result `json:"healthCode,omitempty"`
	// +optional
	Msg string `json:"msg,omitempty"`
	// +optional
	Err string `json:"err,omitempty"`
}

type ValidatorFn added in v1.6.0

type ValidatorFn func([]byte) error

Jump to

Keyboard shortcuts

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