k8s

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package k8s is a latency timing source for K8s API events

Index

Constants

This section is empty.

Variables

View Source
var (
	Name = "K8s"
)

Functions

This section is empty.

Types

type Source

type Source struct {
	// contains filtered or unexported fields
}

Source is the K8s API http source

func New

func New(clientset *kubernetes.Clientset, nodeName string, podNamespace string) *Source

New instantiates a new instance of the K8s API source

func (Source) ClearCache

func (s Source) ClearCache()

ClearCache is a noop for the K8s API Source since it is an http source, not a log file

func (*Source) Find

func (s *Source) Find(event *sources.Event) ([]sources.FindResult, error)

Find will use the Event's FindFunc and CommentFunc to search the source and return the result

func (*Source) FindPodCreationTime

func (s *Source) FindPodCreationTime() sources.FindFunc

FindPodCreationTime retrieves the Pod creation time

func (Source) Name

func (s Source) Name() string

Name is the name of the source

func (*Source) ParseTimeFor

func (s *Source) ParseTimeFor(event []byte) (time.Time, error)

ParseTimeFor parses an event and returns the time

func (Source) String

func (s Source) String() string

String is a human readable string of the source

Jump to

Keyboard shortcuts

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