service

package
v0.0.0-...-dfdee5b Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {

	//create service
	Create(ctx context.Context, namespace string, service *coreV1.Service) error

	//delete service
	Delete(ctx context.Context, namespace string, name string) error

	//list service
	List(ctx context.Context, namespace string, selector labels.Selector) ([]*coreV1.Service, error)

	//get service
	Get(ctx context.Context, namespace string, name string) (*coreV1.Service, error)

	//watch event handler
	WatchEvent(ctx context.Context, handler ServiceHandlerFuncs)
}

service interface

func NewService

func NewService(clientset *kubernetes.Clientset, factory informers.SharedInformerFactory) Service

new service

type ServiceHandlerFuncs

type ServiceHandlerFuncs struct {
	AddFunc    func(obj *coreV1.Service)
	UpdateFunc func(oldObj, newObj *coreV1.Service)
	DeleteFunc func(obj *coreV1.Service)
}

ServiceHandlerFuncs

func (ServiceHandlerFuncs) OnAdd

func (j ServiceHandlerFuncs) OnAdd(obj interface{})

OnAdd calls AddFunc if it's not nil.

func (ServiceHandlerFuncs) OnDelete

func (j ServiceHandlerFuncs) OnDelete(obj interface{})

OnDelete calls DeleteFunc if it's not nil.

func (ServiceHandlerFuncs) OnUpdate

func (j ServiceHandlerFuncs) OnUpdate(oldObj, newObj interface{})

OnUpdate calls UpdateFunc if it's not nil.

Jump to

Keyboard shortcuts

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