Documentation ¶
Index ¶
- type IResourceService
- type Interface
- type ObjectPatcher
- type Service
- func (s *Service) Apply(namespace string, resource k8s.ResourceType, name string, ...) (*UnstructuredExtend, bool, error)
- func (s *Service) ApplyGVR(namespace, name string, gvr *schema.GroupVersionResource, ...) (*UnstructuredExtend, bool, error)
- func (s *Service) DiscoveryClient() *discovery.DiscoveryClient
- func (s *Service) ForceUpdate(namespace string, resource k8s.ResourceType, name string, ...) (*UnstructuredExtend, error)
- func (s *Service) Get(namespace string, resource k8s.ResourceType, name string, ...) (*UnstructuredExtend, error)
- func (s *Service) Install(resourceType k8s.ResourceType, r IResourceService)
- func (s *Service) List(namespace string, resource k8s.ResourceType, selector string) (*UnstructuredListExtend, error)
- func (s *Service) ListGVR(namespace string, gvr schema.GroupVersionResource, selector string) (*UnstructuredListExtend, error)
- func (s *Service) ListLimit(namespace string, resourceType k8s.ResourceType, flag string, pos, size int64, ...) (*UnstructuredListExtend, error)
- func (s *Service) Patch(namespace string, resource k8s.ResourceType, name string, data []byte) (*UnstructuredExtend, error)
- func (s *Service) RESETClient() rest.Interface
- func (s *Service) Watch(namespace string, resource k8s.ResourceType, resourceVersion string, ...) (<-chan watch.Event, error)
- type UnstructuredExtend
- type UnstructuredListExtend
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IResourceService ¶
type IResourceService interface { Get(namespace, name string) (*UnstructuredExtend, error) List(namespace string, selector string) (*UnstructuredListExtend, error) Apply(namespace, name string, unstructuredExtend *UnstructuredExtend) (*UnstructuredExtend, bool, error) }
type Interface ¶
type Interface interface { ApplyGVR(namespace, name string, gvr *schema.GroupVersionResource, unstructuredExtend *UnstructuredExtend) (*UnstructuredExtend, bool, error) ListGVR(namespace string, gvr schema.GroupVersionResource, selector string) (*UnstructuredListExtend, error) List(namespace string, resource k8s.ResourceType, selector string) (*UnstructuredListExtend, error) ListLimit(namespace string, resourceType k8s.ResourceType, flag string, pos, size int64, selector string) (*UnstructuredListExtend, error) Get(namespace string, resource k8s.ResourceType, name string, subresources ...string) (*UnstructuredExtend, error) Apply(namespace string, resource k8s.ResourceType, name string, unstructuredExtend *UnstructuredExtend) (*UnstructuredExtend, bool, error) ForceUpdate(namespace string, resource k8s.ResourceType, name string, unstructuredExtend *UnstructuredExtend) (*UnstructuredExtend, error) Delete(namespace string, resource k8s.ResourceType, name string) error Watch(namespace string, resource k8s.ResourceType, resourceVersion string, selector string) (<-chan watch.Event, error) Patch(namespace string, resource k8s.ResourceType, name string, data []byte) (*UnstructuredExtend, error) RESETClient() rest.Interface ClientSet() *kubernetes.Clientset DiscoveryClient() *discovery.DiscoveryClient Install(k8s.ResourceType, IResourceService) }
type ObjectPatcher ¶
type Service ¶
func NewService ¶
func (*Service) Apply ¶
func (s *Service) Apply(namespace string, resource k8s.ResourceType, name string, unstructuredExtend *UnstructuredExtend) (*UnstructuredExtend, bool, error)
func (*Service) ApplyGVR ¶
func (s *Service) ApplyGVR(namespace, name string, gvr *schema.GroupVersionResource, unstructuredExtend *UnstructuredExtend) (*UnstructuredExtend, bool, error)
func (*Service) DiscoveryClient ¶
func (s *Service) DiscoveryClient() *discovery.DiscoveryClient
func (*Service) ForceUpdate ¶
func (s *Service) ForceUpdate(namespace string, resource k8s.ResourceType, name string, unstructuredExtend *UnstructuredExtend) (*UnstructuredExtend, error)
func (*Service) Get ¶
func (s *Service) Get(namespace string, resource k8s.ResourceType, name string, subresources ...string) (*UnstructuredExtend, error)
func (*Service) Install ¶
func (s *Service) Install(resourceType k8s.ResourceType, r IResourceService)
func (*Service) List ¶
func (s *Service) List(namespace string, resource k8s.ResourceType, selector string) (*UnstructuredListExtend, error)
func (*Service) ListGVR ¶
func (s *Service) ListGVR(namespace string, gvr schema.GroupVersionResource, selector string) (*UnstructuredListExtend, error)
func (*Service) ListLimit ¶
func (s *Service) ListLimit(namespace string, resourceType k8s.ResourceType, flag string, pos, size int64, selector string) (*UnstructuredListExtend, error)
func (*Service) Patch ¶
func (s *Service) Patch(namespace string, resource k8s.ResourceType, name string, data []byte) (*UnstructuredExtend, error)
func (*Service) RESETClient ¶
type UnstructuredExtend ¶
type UnstructuredExtend struct {
*unstructured.Unstructured
}
func (*UnstructuredExtend) Get ¶
func (u *UnstructuredExtend) Get(path string) (interface{}, error)
u.Get("metadata.name")
func (*UnstructuredExtend) Set ¶
func (u *UnstructuredExtend) Set(path string, value interface{}) error
u.Set("metadata.labels","abc","merge/replace")
type UnstructuredListExtend ¶
type UnstructuredListExtend struct {
*unstructured.UnstructuredList
}
func (*UnstructuredListExtend) Get ¶
func (ul *UnstructuredListExtend) Get(path string) (interface{}, error)
ul.Get("0.metadata.labels","abc")
func (*UnstructuredListExtend) Set ¶
func (ul *UnstructuredListExtend) Set(path string, value interface{}) error
ul.Set("0.metadata.labels","abc")
Click to show internal directories.
Click to hide internal directories.