k8s

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SERVICE    = "Service"
	POD        = "Pod"
	REPLICASET = "ReplicaSet"
	DEPLOYMENT = "Deployment"
	ENDPOINTS  = "Endpoints"
	CONTAINER  = "Container"
	DAEMONSET  = "DaemonSet"
)
View Source
const (
	ADD    = "Add"
	UPDATE = "Update"
	DELETE = "Delete"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	PodUID    string `json:"pod"` // Pod UID
	Image     string `json:"image"`
	Ports     []struct {
		Port     int32  `json:"port"`
		Protocol string `json:"protocol"`
	} `json:"ports"`
}

type K8SResourceType

type K8SResourceType string

type K8sCollector

type K8sCollector struct {
	Events chan interface{}
	// contains filtered or unexported fields
}

func NewK8sCollector

func NewK8sCollector(parentCtx context.Context) (*K8sCollector, error)

func (*K8sCollector) Done

func (k *K8sCollector) Done() <-chan struct{}

func (*K8sCollector) GetK8sVersion added in v0.3.1

func (k *K8sCollector) GetK8sVersion() string

func (*K8sCollector) Init

func (k *K8sCollector) Init(events chan interface{}) error

type K8sNamespaceResources

type K8sNamespaceResources struct {
	Pods     map[string]corev1.Pod     `json:"pods"`     // map[podName]Pod
	Services map[string]corev1.Service `json:"services"` // map[serviceName]Service
}

type K8sResourceMessage

type K8sResourceMessage struct {
	ResourceType string      `json:"type"`
	EventType    string      `json:"eventType"`
	Object       interface{} `json:"object"`
}

Jump to

Keyboard shortcuts

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