kubernetesk8s.io/kubernetes/pkg/registry/core/componentstatus Index | Files

package componentstatus

import "k8s.io/kubernetes/pkg/registry/core/componentstatus"

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

Index

Functions

func ToConditionStatus

func ToConditionStatus(s probe.Result) api.ConditionStatus

Types

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) Get

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

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

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

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

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

type Server

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

func (*Server) DoServerCheck

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

type ServerStatus

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

type ValidatorFn func([]byte) error

Source Files

doc.go rest.go validator.go

Version
v1.18.0
Published
Mar 25, 2020
Platform
js/wasm
Imports
20 packages
Last checked
10 minutes ago

Tools for package owners.