ledger

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ledger

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

func New

func New(client *kubernetes.Clientset, lock *lock.Lock, watchIntervalSec int) *Ledger

func (*Ledger) Close

func (l *Ledger) Close()

func (*Ledger) Register

func (l *Ledger) Register() (<-chan ObjectStatus, observer.CancelFunc)

Register registers a new channel for observing the status of all objects. The channel will receive updates every watchIntervalSec seconds.

func (*Ledger) Watch added in v0.2.0

func (l *Ledger) Watch(kindNamespaceName k8s.KindNamespaceName)

Watch starts watching the object with the given kindNamespaceName. The status of the object will be sent to all registered channels every watchIntervalSec seconds.

type ObjectStatus added in v0.2.0

type ObjectStatus struct {
	KindNamespaceName k8s.KindNamespaceName `json:"kind_namespace_name"`
	Status            Status                `json:"status"`
	IsLocked          bool                  `json:"is_locked"`
}

type Status

type Status struct {
	Message     string        `json:"message"`
	PodStatus   k8s.PodStatus `json:"pod_status"`
	LastRestart string        `json:"last_restart"`
}

Jump to

Keyboard shortcuts

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