kubernetes

package
v0.31.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWatcherClosed = errors.New("channel closed")
)

Functions

func RegisterDaemonSetInformer added in v0.15.0

func RegisterDaemonSetInformer(informerFactory informers.SharedInformerFactory, exporter Exporter, handlerFactory ResourceEventHandlerFactory, clientset *kubernetes.Clientset)

func RegisterDeploymentInformer added in v0.15.0

func RegisterDeploymentInformer(informerFactory informers.SharedInformerFactory, exporter Exporter, handlerFactory ResourceEventHandlerFactory, clientset *kubernetes.Clientset)

func RegisterJobInformer added in v0.15.0

func RegisterJobInformer(informerFactory informers.SharedInformerFactory, exporter Exporter, handlerFactory ResourceEventHandlerFactory, clientset *kubernetes.Clientset)

func RegisterPodInformer added in v0.15.0

func RegisterPodInformer(informerFactory informers.SharedInformerFactory, exporter Exporter, handlerFactory ResourceEventHandlerFactory, clientset *kubernetes.Clientset, moduloCrashReportNotif float64)

func RegisterStatefulSetInformer added in v0.15.0

func RegisterStatefulSetInformer(informerFactory informers.SharedInformerFactory, exporter Exporter, handlerFactory ResourceEventHandlerFactory, clientset *kubernetes.Clientset)

Types

type Client

type Client struct {
	Clientset       *kubernetes.Clientset
	InformerFactory informers.SharedInformerFactory
	// contains filtered or unexported fields
}

func NewClient

func NewClient(kubeConfigPath string) (*Client, error)

func (*Client) HasSynced added in v0.15.0

func (c *Client) HasSynced() bool

func (*Client) Start added in v0.15.0

func (c *Client) Start(stopCh chan struct{}) error

type ContainerLog added in v0.5.0

type ContainerLog struct {
	Level   string
	Message string
}

type DaemonSetInformer added in v0.15.0

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

type DeploymentInformer added in v0.15.0

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

type Exporter added in v0.5.0

type Exporter interface {
	// Send a message through the exporter.
	SendSuccessfulReleaseEvent(c context.Context, event httpinternal.ReleaseEvent) error
	SendPodErrorEvent(c context.Context, event httpinternal.PodErrorEvent) error
	SendJobErrorEvent(c context.Context, event httpinternal.JobErrorEvent) error
}

Exporter sends a formatted event to an upstream.

type JobInformer added in v0.15.0

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

type PodInformer added in v0.15.0

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

type ReleaseManagerExporter added in v0.5.0

type ReleaseManagerExporter struct {
	Log         *log.Logger
	Environment string
	Client      httpinternal.Client
}

func (*ReleaseManagerExporter) SendJobErrorEvent added in v0.12.4

func (e *ReleaseManagerExporter) SendJobErrorEvent(ctx context.Context, event httpinternal.JobErrorEvent) error

func (*ReleaseManagerExporter) SendPodErrorEvent added in v0.5.0

func (e *ReleaseManagerExporter) SendPodErrorEvent(ctx context.Context, event httpinternal.PodErrorEvent) error

func (*ReleaseManagerExporter) SendSuccessfulReleaseEvent added in v0.5.0

func (e *ReleaseManagerExporter) SendSuccessfulReleaseEvent(ctx context.Context, event httpinternal.ReleaseEvent) error

type ResourceEventHandlerFactory added in v0.15.0

type ResourceEventHandlerFactory func(cache.ResourceEventHandlerFuncs) cache.ResourceEventHandler

type ResourceEventHandlerFuncs added in v0.15.0

type ResourceEventHandlerFuncs struct {
	ShouldProcess func() bool
	cache.ResourceEventHandlerFuncs
}

ResourceEventHandlerFuncs is a cache.ResourceEventHandler that can be configured to skip event handlers based on a ShouldProcess func.

func (ResourceEventHandlerFuncs) OnAdd added in v0.15.0

func (r ResourceEventHandlerFuncs) OnAdd(obj interface{})

OnAdd calls AddFunc if it's not nil.

func (ResourceEventHandlerFuncs) OnDelete added in v0.15.0

func (r ResourceEventHandlerFuncs) OnDelete(obj interface{})

OnDelete calls DeleteFunc if it's not nil.

func (ResourceEventHandlerFuncs) OnUpdate added in v0.15.0

func (r ResourceEventHandlerFuncs) OnUpdate(oldObj, newObj interface{})

OnUpdate calls UpdateFunc if it's not nil.

type StatefulSetInformer added in v0.15.0

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

Jump to

Keyboard shortcuts

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