manager

package
v0.0.0-...-1100b98 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2024 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerManager

type DockerManager struct {
	PodID      uint
	RespID     string
	Proxies    []proxy.IProxy
	Nats       []*model.Nat
	CancelCtx  context.Context
	CancelFunc context.CancelFunc
	// contains filtered or unexported fields
}

func (*DockerManager) Duration

func (c *DockerManager) Duration() (duration time.Duration)

func (*DockerManager) Remove

func (c *DockerManager) Remove()

func (*DockerManager) RemoveAfterDuration

func (c *DockerManager) RemoveAfterDuration() (success bool)

func (*DockerManager) Renew

func (c *DockerManager) Renew(duration time.Duration)

func (*DockerManager) SetPodID

func (c *DockerManager) SetPodID(podID uint)

func (*DockerManager) Setup

func (c *DockerManager) Setup() (nats []*model.Nat, err error)

func (*DockerManager) Status

func (c *DockerManager) Status() (status string, err error)

type IContainerManager

type IContainerManager interface {
	Setup() (nats []*model.Nat, err error)
	Status() (status string, err error)
	Duration() (duration time.Duration)
	Remove()
	RemoveAfterDuration() (success bool)
	Renew(duration time.Duration)
	SetPodID(podID uint)
}

func NewContainerManager

func NewContainerManager(challenge model.Challenge, flag model.Flag, duration time.Duration) IContainerManager

func NewDockerManager

func NewDockerManager(challenge model.Challenge, flag model.Flag, duration time.Duration) IContainerManager

func NewK8sManager

func NewK8sManager(challenge model.Challenge, flag model.Flag, duration time.Duration) IContainerManager

type K8sManager

type K8sManager struct {
	PodID      uint
	RespID     string
	Nats       []*model.Nat
	Proxies    []proxy.IProxy
	Inspect    corev1.Pod
	CancelCtx  context.Context
	CancelFunc context.CancelFunc
	// contains filtered or unexported fields
}

func (*K8sManager) Duration

func (c *K8sManager) Duration() (duration time.Duration)

func (*K8sManager) Remove

func (c *K8sManager) Remove()

func (*K8sManager) RemoveAfterDuration

func (c *K8sManager) RemoveAfterDuration() (success bool)

func (*K8sManager) Renew

func (c *K8sManager) Renew(duration time.Duration)

func (*K8sManager) SetPodID

func (c *K8sManager) SetPodID(podID uint)

func (*K8sManager) Setup

func (c *K8sManager) Setup() (nats []*model.Nat, err error)

func (*K8sManager) Status

func (c *K8sManager) Status() (status string, err error)

Jump to

Keyboard shortcuts

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