lifecycle

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

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

Cluster is a controller-runtime cluster that can be stopped by cancelling its root context.

func NewCluster

func NewCluster(address string, baseRestConfig *rest.Config) (*Cluster, error)

func (*Cluster) GetCache

func (c *Cluster) GetCache() (cache.Cache, error)

func (*Cluster) GetClient

func (c *Cluster) GetClient() (ctrlruntimeclient.Client, error)

func (*Cluster) GetCluster

func (c *Cluster) GetCluster() cluster.Cluster

func (*Cluster) Running

func (c *Cluster) Running() bool

func (*Cluster) Start

func (c *Cluster) Start(ctx context.Context, log *zap.SugaredLogger) error

Start starts a goroutine for the underlying cluster object; make sure to use a long-lived context here.

func (*Cluster) Stop

func (c *Cluster) Stop(log *zap.SugaredLogger) error

type Controller

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

Controller is a controller-runtime controller that can be stopped by cancelling its root context.

func NewController

func NewController(upstream controller.Controller) (Controller, error)

func (*Controller) Running

func (c *Controller) Running() bool

func (*Controller) Start

func (c *Controller) Start(ctx context.Context, log *zap.SugaredLogger) error

Start starts the wrapped controller.

func (*Controller) Stop

func (c *Controller) Stop(log *zap.SugaredLogger, cause error) error

Jump to

Keyboard shortcuts

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