k8s

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitKubeData added in v0.1.1

func InitKubeData()

initKubeData initializes kubeData global variable

Types

type DeploymentData

type DeploymentData struct {
	Image          string
	NamePod        string
	Timestamp      string
	NameDeployment string
	ReleaseName    string
	NameSpace      string
}

type IKuberService

type IKuberService interface {
	Connect() error
	GetDataFromDeployment() (*DeploymentData, error)
	RestartPod() error
}

type KubeClient

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

func NewKubeService

func NewKubeService(logger *logrus.Logger) *KubeClient

NewKubeService creates a new service for working with the Kubernetes API

func (*KubeClient) Connect

func (ks *KubeClient) Connect() error

Connect to Kubernetes API

func (*KubeClient) GetDataFromDeployment

func (ks *KubeClient) GetDataFromDeployment() (*DeploymentData, error)

GetDataFromDeployment returns data from deployment

func (*KubeClient) RestartPod

func (ks *KubeClient) RestartPod() error

RestartPod restarts pod

type KubeData

type KubeData struct {
	Namespace    string
	TargetName   string
	TargetType   string
	PodName      string
	PodNamespace string
}

Directories

Path Synopsis
Package mock_k8s is a generated GoMock package.
Package mock_k8s is a generated GoMock package.

Jump to

Keyboard shortcuts

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