provider

package
v0.11.5 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNodeNotFound = gperr.New("node not found in pool")

Functions

func NewDockerProvider

func NewDockerProvider(dockerHost, containerID string) (idlewatcher.Provider, error)

func NewProxmoxProvider

func NewProxmoxProvider(nodeName string, vmid int) (idlewatcher.Provider, error)

Types

type DockerProvider

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

func (*DockerProvider) Close

func (p *DockerProvider) Close()

func (*DockerProvider) ContainerKill

func (p *DockerProvider) ContainerKill(ctx context.Context, signal idlewatcher.Signal) error

func (*DockerProvider) ContainerPause

func (p *DockerProvider) ContainerPause(ctx context.Context) error

func (*DockerProvider) ContainerStart

func (p *DockerProvider) ContainerStart(ctx context.Context) error

func (*DockerProvider) ContainerStatus

func (p *DockerProvider) ContainerStatus(ctx context.Context) (idlewatcher.ContainerStatus, error)

func (*DockerProvider) ContainerStop

func (p *DockerProvider) ContainerStop(ctx context.Context, signal idlewatcher.Signal, timeout int) error

func (*DockerProvider) ContainerUnpause

func (p *DockerProvider) ContainerUnpause(ctx context.Context) error

func (*DockerProvider) Watch

func (p *DockerProvider) Watch(ctx context.Context) (eventCh <-chan watcher.Event, errCh <-chan gperr.Error)

type ProxmoxProvider

type ProxmoxProvider struct {
	*proxmox.Node
	// contains filtered or unexported fields
}

func (*ProxmoxProvider) Close

func (p *ProxmoxProvider) Close()

func (*ProxmoxProvider) ContainerKill

func (p *ProxmoxProvider) ContainerKill(ctx context.Context, _ idlewatcher.Signal) error

func (*ProxmoxProvider) ContainerPause

func (p *ProxmoxProvider) ContainerPause(ctx context.Context) error

func (*ProxmoxProvider) ContainerStart

func (p *ProxmoxProvider) ContainerStart(ctx context.Context) error

func (*ProxmoxProvider) ContainerStatus

func (p *ProxmoxProvider) ContainerStatus(ctx context.Context) (idlewatcher.ContainerStatus, error)

func (*ProxmoxProvider) ContainerStop

func (p *ProxmoxProvider) ContainerStop(ctx context.Context, _ idlewatcher.Signal, _ int) error

func (*ProxmoxProvider) ContainerUnpause

func (p *ProxmoxProvider) ContainerUnpause(ctx context.Context) error

func (*ProxmoxProvider) Watch

func (p *ProxmoxProvider) Watch(ctx context.Context) (<-chan watcher.Event, <-chan gperr.Error)

Jump to

Keyboard shortcuts

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