k8sapp

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type K8sHandler

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

func NewK8sHandler

func NewK8sHandler(
	ctx context.Context,
	natsClient *nats.Client,
	kubeConfPath string,
	requiresPortForward bool,
	logger zerolog.Logger,
) (*K8sHandler, error)

func (*K8sHandler) AppName added in v0.9.0

func (k *K8sHandler) AppName() string

func (*K8sHandler) Handlers

func (k *K8sHandler) Handlers() map[string]worker.Handler

func (*K8sHandler) RunPod

func (k *K8sHandler) RunPod(ctx context.Context, msg jetstream.Msg) error

type LogErrorWriter

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

func (LogErrorWriter) Write

func (l LogErrorWriter) Write(p []byte) (n int, err error)

type PortForward

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

func NewPortForward

func NewPortForward(cfg *rest.Config, logger zerolog.Logger) *PortForward

func (*PortForward) ForwardPodPort

func (p *PortForward) ForwardPodPort(pod *corev1.Pod, podPort int) (int, func(), error)

type PortForwarder

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

type RunPodInput

type RunPodInput struct {
	Image       string            `json:"image" validate:"required"`
	Command     []string          `json:"command,omitempty"`
	Args        []string          `json:"args,omitempty"`
	Namespace   string            `json:"namespace,omitempty" validate:"omitempty,hostname_rfc1123"`
	InDir       string            `json:"in_dir,omitempty" validate:"omitempty,dirpath,min=1"`
	InFiles     map[string]string `json:"in_files,omitempty" validate:"omitempty,dive,keys,filepath,min=1,endkeys"`
	OutDir      string            `json:"out_dir,omitempty" validate:"omitempty,dirpath,min=1"`
	ResultPath  string            `json:"out_path,omitempty" validate:"omitempty,filepath,min=1"`
	CpuLimit    string            `json:"cpu,omitempty"`
	MemLimit    string            `json:"memory,omitempty"`
	SkipCleanup bool              `json:"skip_cleanup"`
}

Jump to

Keyboard shortcuts

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