Documentation ¶
Index ¶
- type BaseProvider
- func (b *BaseProvider) CreatePod(ctx context.Context, pod *corev1.Pod) error
- func (b *BaseProvider) DeletePod(ctx context.Context, pod *corev1.Pod) error
- func (b *BaseProvider) GetPod(_ context.Context, namespace, name string) (*corev1.Pod, error)
- func (b *BaseProvider) GetPodStatus(ctx context.Context, namespace, name string) (*corev1.PodStatus, error)
- func (b *BaseProvider) GetPods(_ context.Context) ([]*corev1.Pod, error)
- func (b *BaseProvider) NotifyPods(_ context.Context, cb func(*corev1.Pod))
- func (b *BaseProvider) Run(ctx context.Context)
- func (b *BaseProvider) SyncBizInfo(bizInfos []ark.ArkBizInfo)
- func (b *BaseProvider) UpdatePod(ctx context.Context, pod *corev1.Pod) error
- type RuntimeInfoStore
- func (r *RuntimeInfoStore) DeletePod(podKey string)
- func (r *RuntimeInfoStore) GetBizModel(bizIdentity string) *ark.BizModel
- func (r *RuntimeInfoStore) GetPodByKey(podKey string) *corev1.Pod
- func (r *RuntimeInfoStore) GetPods() []*corev1.Pod
- func (r *RuntimeInfoStore) GetRelatedBizModels(podKey string) []*ark.BizModel
- func (r *RuntimeInfoStore) GetRelatedPodKeyByBizIdentity(bizIdentity string) string
- func (r *RuntimeInfoStore) PutPod(pod *corev1.Pod)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseProvider ¶
type BaseProvider struct { Namespace string // contains filtered or unexported fields }
func NewBaseProvider ¶
func NewBaseProvider(namespace, localIP, nodeID string, k8sClient kubernetes.Interface, t tunnel.Tunnel) *BaseProvider
func (*BaseProvider) GetPod ¶
GetPod this method is simply used to return the observed defaultPod by local
so the outer control loop can call CreatePod / UpdatePod / DeletePod accordingly just return the defaultPod from the local store
func (*BaseProvider) GetPodStatus ¶
func (b *BaseProvider) GetPodStatus(ctx context.Context, namespace, name string) (*corev1.PodStatus, error)
GetPodStatus this will be called repeatedly by virtual kubelet framework to get the defaultPod status we should query the actual runtime info and translate them in to V1PodStatus accordingly
func (*BaseProvider) NotifyPods ¶
func (b *BaseProvider) NotifyPods(_ context.Context, cb func(*corev1.Pod))
func (*BaseProvider) Run ¶
func (b *BaseProvider) Run(ctx context.Context)
func (*BaseProvider) SyncBizInfo ¶
func (b *BaseProvider) SyncBizInfo(bizInfos []ark.ArkBizInfo)
type RuntimeInfoStore ¶
RuntimeInfoStore provide the in memory runtime information.
func NewRuntimeInfoStore ¶
func NewRuntimeInfoStore() *RuntimeInfoStore
func (*RuntimeInfoStore) DeletePod ¶
func (r *RuntimeInfoStore) DeletePod(podKey string)
func (*RuntimeInfoStore) GetBizModel ¶
func (r *RuntimeInfoStore) GetBizModel(bizIdentity string) *ark.BizModel
func (*RuntimeInfoStore) GetPodByKey ¶
func (r *RuntimeInfoStore) GetPodByKey(podKey string) *corev1.Pod
func (*RuntimeInfoStore) GetPods ¶
func (r *RuntimeInfoStore) GetPods() []*corev1.Pod
func (*RuntimeInfoStore) GetRelatedBizModels ¶
func (r *RuntimeInfoStore) GetRelatedBizModels(podKey string) []*ark.BizModel
func (*RuntimeInfoStore) GetRelatedPodKeyByBizIdentity ¶
func (r *RuntimeInfoStore) GetRelatedPodKeyByBizIdentity(bizIdentity string) string
func (*RuntimeInfoStore) PutPod ¶
func (r *RuntimeInfoStore) PutPod(pod *corev1.Pod)
Click to show internal directories.
Click to hide internal directories.