Documentation ¶
Index ¶
- Constants
- func FixLog(ctx context.Context, width int)
- func MakeSpecs(m []Resource, ns string, trackGeneric bool) (*multitrack.MultitrackSpecs, error)
- func NewEmptyContainerNameError(annotation, value string) error
- func NewInvalidValueError[T ~string](annotation string, value T, choices []T) error
- func NewParseError(typ, value string, err error) error
- func SilenceKlog(ctx context.Context) error
- func SilenceKlogV2(ctx context.Context) error
- type Config
- type EmptyContainerNameError
- type InvalidValueError
- type ParseError
- type Resource
- type Spec
Constants ¶
View Source
const ( // TrackTerminationModeAnnoName annotation allows to specify how to track resource. TrackTerminationModeAnnoName = helper.RootAnnoName + "track-termination-mode" // FailModeAnnoName annotation specifies what to do after resource fails. FailModeAnnoName = helper.RootAnnoName + "fail-mode" // FailuresAllowedPerReplicaAnnoName specifies how many times resource is allowed to fail. FailuresAllowedPerReplicaAnnoName = helper.RootAnnoName + "failures-allowed-per-replica" // LogRegexAnnoName allows to set regexp for log lines. LogRegexAnnoName = helper.RootAnnoName + "log-regex" // LogRegexForAnnoPrefix allows to set regexp for individual containers. LogRegexForAnnoPrefix = helper.RootAnnoName + "log-regex-for-" // SkipLogsAnnoName allows to skip log streaming. SkipLogsAnnoName = helper.RootAnnoName + "skip-logs" // SkipLogsForContainersAnnoName allows to skip log streaming for individual containers. SkipLogsForContainersAnnoName = helper.RootAnnoName + "skip-logs-for-containers" // ShowLogsOnlyForContainersAnnoName allows to show logs only for specified containers. ShowLogsOnlyForContainersAnnoName = helper.RootAnnoName + "show-logs-only-for-containers" // ShowEventsAnnoName enables streaming resource events. ShowEventsAnnoName = helper.RootAnnoName + "show-service-messages" )
Variables ¶
This section is empty.
Functions ¶
func MakeSpecs ¶
func MakeSpecs(m []Resource, ns string, trackGeneric bool) (*multitrack.MultitrackSpecs, error)
MakeSpecs creates *multitrack.MultitrackSpecs for Resource slice in provided namespace.
func NewEmptyContainerNameError ¶ added in v0.31.1
func NewInvalidValueError ¶ added in v0.31.1
func NewParseError ¶ added in v0.31.1
func SilenceKlog ¶ added in v0.20.0
SilenceKlog discards all klog logs except FATAL.
func SilenceKlogV2 ¶ added in v0.20.0
SilenceKlogV2 discards all klog/v2 logs except FATAL.
Types ¶
type Config ¶
type Config struct { Enabled bool TrackGeneric bool StatusInterval time.Duration Timeout time.Duration StartDelay time.Duration LogWidth int }
Config is config for kubedog library.
type EmptyContainerNameError ¶ added in v0.31.1
type EmptyContainerNameError struct {
// contains filtered or unexported fields
}
func (EmptyContainerNameError) Error ¶ added in v0.31.1
func (err EmptyContainerNameError) Error() string
type InvalidValueError ¶ added in v0.31.1
type InvalidValueError[T ~string] struct { // contains filtered or unexported fields }
func (InvalidValueError[T]) Error ¶ added in v0.31.1
func (err InvalidValueError[T]) Error() string
type ParseError ¶ added in v0.31.1
type ParseError struct {
// contains filtered or unexported fields
}
func (ParseError) Error ¶ added in v0.31.1
func (err ParseError) Error() string
func (ParseError) Unwrap ¶ added in v0.31.1
func (err ParseError) Unwrap() error
type Resource ¶
type Resource struct { Spec `yaml:"spec,omitempty" json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` meta1.TypeMeta `yaml:",inline" json:",inline"` meta1.ObjectMeta `yaml:"metadata,omitempty" json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` }
Resource is base structure for all k8s resources that have replicas. Used to parse out replicas count.
func Parse ¶ added in v0.12.0
Parse parses YAML manifests of kubernetes resources and returns Resource slice.
func (*Resource) DeepCopyObject ¶ added in v0.30.0
DeepCopyObject is required to implement runtime.Object interface. It doesn't actually do anything, don't use.
func (*Resource) MakeMultiTrackSpec ¶
func (r *Resource) MakeMultiTrackSpec(ns string) (*multitrack.MultitrackSpec, error)
MakeMultiTrackSpec creates *multitrack.MultitrackSpec for current resource.
Click to show internal directories.
Click to hide internal directories.