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.
Click to show internal directories.
Click to hide internal directories.