Documentation ¶
Index ¶
- func DecodeK8sResName(name string) (string, error)
- func EncodeK8sResName(name string) (string, error)
- func NewCachingConverter(expirationTime time.Duration) k8s_common.Converter
- func NewSimpleConverter() k8s_common.Converter
- func NewStore(client kube_client.Client, scheme *kube_runtime.Scheme, ...) (store.ResourceStore, error)
- type KubeFactory
- type KubernetesMetaAdapter
- func (m *KubernetesMetaAdapter) GetCreationTime() time.Time
- func (m *KubernetesMetaAdapter) GetLabels() map[string]string
- func (m *KubernetesMetaAdapter) GetMesh() string
- func (m *KubernetesMetaAdapter) GetModificationTime() time.Time
- func (m *KubernetesMetaAdapter) GetName() string
- func (m *KubernetesMetaAdapter) GetNameExtensions() core_model.ResourceNameExtensions
- func (m *KubernetesMetaAdapter) GetVersion() string
- type KubernetesStore
- func (s *KubernetesStore) Create(ctx context.Context, r core_model.Resource, fs ...store.CreateOptionsFunc) error
- func (s *KubernetesStore) Delete(ctx context.Context, r core_model.Resource, fs ...store.DeleteOptionsFunc) error
- func (s *KubernetesStore) Get(ctx context.Context, r core_model.Resource, fs ...store.GetOptionsFunc) error
- func (s *KubernetesStore) List(ctx context.Context, rs core_model.ResourceList, fs ...store.ListOptionsFunc) error
- func (s *KubernetesStore) Update(ctx context.Context, r core_model.Resource, fs ...store.UpdateOptionsFunc) error
- type ResourceMapperFunc
- type SimpleConverter
- func (c *SimpleConverter) ToCoreList(in k8s_model.KubernetesList, out core_model.ResourceList, ...) error
- func (c *SimpleConverter) ToCoreResource(obj k8s_model.KubernetesObject, out core_model.Resource) error
- func (c *SimpleConverter) ToKubernetesList(rl core_model.ResourceList) (k8s_model.KubernetesList, error)
- func (c *SimpleConverter) ToKubernetesObject(r core_model.Resource) (k8s_model.KubernetesObject, error)
- type SimpleKubeFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeK8sResName ¶
func EncodeK8sResName ¶
func NewCachingConverter ¶
func NewCachingConverter(expirationTime time.Duration) k8s_common.Converter
func NewSimpleConverter ¶
func NewSimpleConverter() k8s_common.Converter
func NewStore ¶
func NewStore(client kube_client.Client, scheme *kube_runtime.Scheme, converter k8s_common.Converter) (store.ResourceStore, error)
Types ¶
type KubeFactory ¶
type KubeFactory interface { NewObject(r core_model.Resource) (k8s_model.KubernetesObject, error) NewList(rl core_model.ResourceList) (k8s_model.KubernetesList, error) }
func NewSimpleKubeFactory ¶
func NewSimpleKubeFactory() KubeFactory
type KubernetesMetaAdapter ¶
type KubernetesMetaAdapter struct { kube_meta.ObjectMeta Mesh string }
func (*KubernetesMetaAdapter) GetCreationTime ¶
func (m *KubernetesMetaAdapter) GetCreationTime() time.Time
func (*KubernetesMetaAdapter) GetLabels ¶
func (m *KubernetesMetaAdapter) GetLabels() map[string]string
func (*KubernetesMetaAdapter) GetMesh ¶
func (m *KubernetesMetaAdapter) GetMesh() string
func (*KubernetesMetaAdapter) GetModificationTime ¶
func (m *KubernetesMetaAdapter) GetModificationTime() time.Time
func (*KubernetesMetaAdapter) GetName ¶
func (m *KubernetesMetaAdapter) GetName() string
func (*KubernetesMetaAdapter) GetNameExtensions ¶
func (m *KubernetesMetaAdapter) GetNameExtensions() core_model.ResourceNameExtensions
func (*KubernetesMetaAdapter) GetVersion ¶
func (m *KubernetesMetaAdapter) GetVersion() string
type KubernetesStore ¶
type KubernetesStore struct { Client kube_client.Client Converter k8s_common.Converter Scheme *kube_runtime.Scheme }
func (*KubernetesStore) Create ¶
func (s *KubernetesStore) Create(ctx context.Context, r core_model.Resource, fs ...store.CreateOptionsFunc) error
func (*KubernetesStore) Delete ¶
func (s *KubernetesStore) Delete(ctx context.Context, r core_model.Resource, fs ...store.DeleteOptionsFunc) error
func (*KubernetesStore) Get ¶
func (s *KubernetesStore) Get(ctx context.Context, r core_model.Resource, fs ...store.GetOptionsFunc) error
func (*KubernetesStore) List ¶
func (s *KubernetesStore) List(ctx context.Context, rs core_model.ResourceList, fs ...store.ListOptionsFunc) error
func (*KubernetesStore) Update ¶
func (s *KubernetesStore) Update(ctx context.Context, r core_model.Resource, fs ...store.UpdateOptionsFunc) error
type ResourceMapperFunc ¶
type ResourceMapperFunc func(resource model.Resource, namespace string) (k8s_model.KubernetesObject, error)
func NewInferenceMapper ¶
func NewInferenceMapper(systemNamespace string, kubeFactory KubeFactory) ResourceMapperFunc
NewInferenceMapper creates a ResourceMapper that infers a k8s resource from the core_model. Extract namespace from the name if necessary. This mostly useful when the underlying store is not kubernetes but you want to show what a kubernetes version of the policy would be like (in global for example).
func NewKubernetesMapper ¶
func NewKubernetesMapper(kubeFactory KubeFactory) ResourceMapperFunc
NewKubernetesMapper creates a ResourceMapper that returns the k8s object as is. This is meant to be used when the underlying store is kubernetes
type SimpleConverter ¶
type SimpleConverter struct {
KubeFactory KubeFactory
}
func (*SimpleConverter) ToCoreList ¶
func (c *SimpleConverter) ToCoreList(in k8s_model.KubernetesList, out core_model.ResourceList, predicate k8s_common.ConverterPredicate) error
func (*SimpleConverter) ToCoreResource ¶
func (c *SimpleConverter) ToCoreResource(obj k8s_model.KubernetesObject, out core_model.Resource) error
func (*SimpleConverter) ToKubernetesList ¶
func (c *SimpleConverter) ToKubernetesList(rl core_model.ResourceList) (k8s_model.KubernetesList, error)
func (*SimpleConverter) ToKubernetesObject ¶
func (c *SimpleConverter) ToKubernetesObject(r core_model.Resource) (k8s_model.KubernetesObject, error)
type SimpleKubeFactory ¶
type SimpleKubeFactory struct {
KubeTypes k8s_registry.TypeRegistry
}
func (*SimpleKubeFactory) NewList ¶
func (f *SimpleKubeFactory) NewList(rl core_model.ResourceList) (k8s_model.KubernetesList, error)
func (*SimpleKubeFactory) NewObject ¶
func (f *SimpleKubeFactory) NewObject(r core_model.Resource) (k8s_model.KubernetesObject, error)
Directories ¶
Path | Synopsis |
---|---|
native
|
|
api/v1alpha1
Package v1alpha1 contains API Schema definitions for the mesh v1alpha1 API group +groupName=dubbo.io
|
Package v1alpha1 contains API Schema definitions for the mesh v1alpha1 API group +groupName=dubbo.io |
Click to show internal directories.
Click to hide internal directories.