remotecluster

package
v0.0.0-...-8391792 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ObjID

func ObjID(clusterID, ns, name string, uid types.UID) string

Types

type Event

type Event struct {
	Cluster *RemoteCluster
	Type    EventType
	ObjType ObjectType
	Objs    []interface{}
	ObjID   string
}

func (*Event) ToAdded

func (ev *Event) ToAdded() *Event

func (*Event) ToUpdatedFrom

func (ev *Event) ToUpdatedFrom(oldObj interface{}) *Event

type EventType

type EventType string
const (
	AddEvent    EventType = "Added"
	DeleteEvent EventType = "Deleted"
	UpdateEvent EventType = "Updated"
)

type ObjectType

type ObjectType string
const (
	NetworkPolicy ObjectType = "np"
	Pod           ObjectType = "pod"
)

type RemoteCluster

type RemoteCluster struct {
	ClusterID string
	ClientSet kubernetes.Interface
	// contains filtered or unexported fields
}

func New

func New(clusterID string, clientSet kubernetes.Interface) *RemoteCluster

func (*RemoteCluster) Delete

func (rc *RemoteCluster) Delete(np *v1net.NetworkPolicy) error

func (*RemoteCluster) Distribute

func (rc *RemoteCluster) Distribute(np *v1net.NetworkPolicy) error

func (*RemoteCluster) GetNetworkPolicies

func (rc *RemoteCluster) GetNetworkPolicies() []interface{}

func (*RemoteCluster) GetPods

func (rc *RemoteCluster) GetPods() []interface{}

func (*RemoteCluster) HasSynced

func (rc *RemoteCluster) HasSynced() bool

func (*RemoteCluster) NewAddEvent

func (rc *RemoteCluster) NewAddEvent(objInterface interface{}) *Event

func (*RemoteCluster) NewDeleteEvent

func (rc *RemoteCluster) NewDeleteEvent(objInterface interface{}) *Event

func (*RemoteCluster) NewUpdateEvent

func (rc *RemoteCluster) NewUpdateEvent(objInterface, newObjInterface interface{}) *Event

func (*RemoteCluster) OnAdd

func (rc *RemoteCluster) OnAdd(obj interface{}, _ bool)

func (*RemoteCluster) OnDelete

func (rc *RemoteCluster) OnDelete(obj interface{})

func (*RemoteCluster) OnUpdate

func (rc *RemoteCluster) OnUpdate(oldObj, newObj interface{})

func (*RemoteCluster) Run

func (rc *RemoteCluster) Run(onSyncDoneFunc func(resourceWatcher *RemoteCluster))

func (*RemoteCluster) SetEventChannel

func (rc *RemoteCluster) SetEventChannel(eventChan chan *Event)

func (*RemoteCluster) Stop

func (rc *RemoteCluster) Stop()

Stop will stop the running informers.

func (*RemoteCluster) Stopped

func (rc *RemoteCluster) Stopped() bool

Jump to

Keyboard shortcuts

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