hook

package
v0.0.0-...-d125d34 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultDelay = 1 * time.Second
	MaxDelay     = 1000 * time.Second
)

Functions

This section is empty.

Types

type Event

type Event struct {
	EventType EventType
	Event     interface{}
}

type EventCtx

type EventCtx struct {
	EventType   EventType
	Event       interface{}
	Ctx         context.Context
	FailedTimes uint
}

type EventType

type EventType string
const (
	CreateApplication EventType = "CreateApplication"
	DeleteApplication EventType = "DeleteApplication"
	CreateCluster     EventType = "CreateCluster"
	DeleteCluster     EventType = "DeleteCluster"
)

type Hook

type Hook interface {
	Push(ctx context.Context, hooks Event)
	Process()
	Stop()
	WaitStop()
}

Jump to

Keyboard shortcuts

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