kubernetes: k8s.io/kubernetes/pkg/kubelet/prober/results Index | Files

package results

import "k8s.io/kubernetes/pkg/kubelet/prober/results"


Package Files


type Manager Uses

type Manager interface {
    // Get returns the cached result for the container with the given ID.
    Get(kubecontainer.ContainerID) (Result, bool)
    // Set sets the cached result for the container with the given ID.
    // The pod is only included to be sent with the update.
    Set(kubecontainer.ContainerID, Result, *v1.Pod)
    // Remove clears the cached result for the container with the given ID.
    // Updates creates a channel that receives an Update whenever its result changes (but not
    // removed).
    // NOTE: The current implementation only supports a single updates channel.
    Updates() <-chan Update

Manager provides a probe results cache and channel of updates.

func NewManager Uses

func NewManager() Manager

NewManager creates and returns an empty results manager.

type Result Uses

type Result int

Result is the type for probe results.

const (
    // Unknown is encoded as -1 (type Result)
    Unknown Result = iota - 1

    // Success is encoded as 0 (type Result)

    // Failure is encoded as 1 (type Result)

func (Result) String Uses

func (r Result) String() string

func (Result) ToPrometheusType Uses

func (r Result) ToPrometheusType() float64

ToPrometheusType translates a Result to a form which is better understood by prometheus.

type Update Uses

type Update struct {
    ContainerID kubecontainer.ContainerID
    Result      Result
    PodUID      types.UID

Update is an enum of the types of updates sent over the Updates channel.

Package results imports 4 packages (graph) and is imported by 480 packages. Updated 2019-11-17. Refresh now. Tools for package owners.