commands

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const AnnotationLastPatchRequestedAt = "hub.traefik.io/last-patch-requested-at"

AnnotationLastPatchRequestedAt is specifies the date at which an update has been requested in the RFC-3339 format.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteIngressACPCommand

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

DeleteIngressACPCommand removes the ACP of a given Ingress.

func NewDeleteIngressACPCommand

func NewDeleteIngressACPCommand(k8sClientSet clientset.Interface, traefikClientSet traefikclientset.Interface) *DeleteIngressACPCommand

NewDeleteIngressACPCommand creates a new DeleteIngressACPCommand.

func (*DeleteIngressACPCommand) Handle

Handle handles the ACP deletion on the given Ingress.

type Handler

type Handler interface {
	Handle(ctx context.Context, id string, requestedAt time.Time, data json.RawMessage) *platform.CommandExecutionReport
}

Handler can handle a command.

type SetIngressACPCommand

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

SetIngressACPCommand sets the given ACP on a specific Ingress.

func NewSetIngressACPCommand

func NewSetIngressACPCommand(
	k8sClientSet clientset.Interface,
	traefikClientSet traefikclientset.Interface,
) *SetIngressACPCommand

NewSetIngressACPCommand creates a new SetIngressACPCommand.

func (*SetIngressACPCommand) Handle

Handle sets an ACP on an Ingress.

type Store

type Store interface {
	ListPendingCommands(ctx context.Context) ([]platform.Command, error)
	SubmitCommandReports(ctx context.Context, reports []platform.CommandExecutionReport) error
}

Store is capable of fetching commands and sending command reports.

type Watcher

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

Watcher watches and applies the patch commands from the platform.

func NewWatcher

func NewWatcher(interval time.Duration, store Store, k8sClientSet clientset.Interface, traefikClientSet traefikclientset.Interface) *Watcher

NewWatcher creates a Watcher.

func (*Watcher) Start

func (w *Watcher) Start(ctx context.Context)

Start starts watching commands.

Jump to

Keyboard shortcuts

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