taskinformer

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Informer

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

Informer is component which find cluster and informer cluster

func NewInformer

func NewInformer(info *types.ServerInfo, zkCli *zkclient.ZkClient) *Informer

NewInformer create new informer

func (*Informer) RegisterHandler

func (i *Informer) RegisterHandler(h TaskHandler)

RegisterHandler register task handler

func (*Informer) Run

func (i *Informer) Run(ctx context.Context)

Run run the informer

type TaskHandler

type TaskHandler interface {
	OnAdd(add common.Cluster)
	OnUpdate(old, new common.Cluster)
	OnDelete(del common.Cluster)
}

TaskHandler handler for task

Jump to

Keyboard shortcuts

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