Class: CRDStore#
Hierarchy#
KubeObjectStore
<CustomResourceDefinition
,CustomResourceDefinitionApi
>
↳ CRDStore
Table of contents#
Constructors#
Properties#
- api
- bufferSize
- dependencies
- eventsBuffer
- failedLoading
- isLoaded
- isLoading
- items
- limit
- selectedItemsIds
- defaultContext
Accessors#
Methods#
- [iterator]
- bindWatchEventsUpdater
- create
- createItem
- defaultSorting
- filterItemsOnLoad
- getAllByNs
- getByGroup
- getById
- getByLabel
- getByName
- getByObject
- getByPath
- getIndexById
- getItems
- getTotalCount
- isSelected
- isSelectedAll
- load
- loadAll
- loadFromPath
- loadItem
- loadItems
- mergeItems
- patch
- pickOnlySelected
- reloadAll
- remove
- removeItem
- removeItems
- removeSelectedItems
- reset
- resetOnError
- resetSelection
- select
- sortItems
- subscribe
- toggleSelection
- toggleSelectionAll
- unselect
- update
- updateFromEventsBuffer
- updateItem
Constructors#
constructor#
• new CRDStore(dependencies
, api
, opts?
)
Parameters#
Name | Type |
---|---|
dependencies |
CustomResourceDefinitionStoreDependencies |
api |
CustomResourceDefinitionApi |
opts? |
KubeObjectStoreOptions |
Overrides#
Properties#
api#
• Readonly
api: CustomResourceDefinitionApi
Inherited from#
bufferSize#
• Readonly
bufferSize: number
Inherited from#
dependencies#
• Protected
Readonly
dependencies: CustomResourceDefinitionStoreDependencies
eventsBuffer#
• Protected
eventsBuffer: IObservableArray
<IKubeWatchEvent
<KubeJsonApiData
<ClusterScopedMetadata
, CustomResourceDefinitionStatus
, CustomResourceDefinitionSpec
>>>
Inherited from#
failedLoading#
• failedLoading: boolean
= false
Inherited from#
isLoaded#
• isLoaded: boolean
= false
Inherited from#
isLoading#
• isLoading: boolean
= false
Inherited from#
items#
• items: IObservableArray
<CustomResourceDefinition
>
Inherited from#
limit#
• Readonly
limit: undefined
| number
Inherited from#
selectedItemsIds#
• selectedItemsIds: ObservableSet
<string
>
Inherited from#
KubeObjectStore.selectedItemsIds
defaultContext#
▪ Static
Readonly
defaultContext: IObservableValue
<undefined
| ClusterContext
>
Inherited from#
KubeObjectStore.defaultContext
Accessors#
context#
• get
context(): undefined
| ClusterContext
Returns#
undefined
| ClusterContext
Inherited from#
KubeObjectStore.context
contextItems#
• get
contextItems(): K
[]
Returns#
K
[]
Inherited from#
KubeObjectStore.contextItems
contextReady#
• get
contextReady(): Promise
<void
> & { cancel
: () => void
}
Returns#
Promise
<void
> & { cancel
: () => void
}
Inherited from#
KubeObjectStore.contextReady
groups#
• get
groups(): Record
<string
, CustomResourceDefinition
[]>
Returns#
Record
<string
, CustomResourceDefinition
[]>
namespacesReady#
• get
namespacesReady(): Promise
<void
> & { cancel
: () => void
}
Returns#
Promise
<void
> & { cancel
: () => void
}
Inherited from#
KubeObjectStore.namespacesReady
query#
• get
query(): KubeApiQueryParams
Returns#
KubeApiQueryParams
Inherited from#
KubeObjectStore.query
selectedItems#
• get
selectedItems(): Item
[]
Returns#
Item
[]
Inherited from#
KubeObjectStore.selectedItems
Methods#
[iterator]#
▸ [iterator](): Generator
<CustomResourceDefinition
, void
, undefined
>
Returns#
Generator
<CustomResourceDefinition
, void
, undefined
>
Inherited from#
bindWatchEventsUpdater#
▸ Protected
bindWatchEventsUpdater(delay?
): void
Parameters#
Name | Type | Default value |
---|---|---|
delay |
number |
1000 |
Returns#
void
Inherited from#
KubeObjectStore.bindWatchEventsUpdater
create#
▸ create(params
, data?
): Promise
<CustomResourceDefinition
>
Parameters#
Name | Type |
---|---|
params |
Object |
params.name |
string |
params.namespace? |
string |
data? |
PartialObjectDeep <CustomResourceDefinition > |
Returns#
Promise
<CustomResourceDefinition
>
Inherited from#
createItem#
▸ Protected
createItem(params
, data?
): Promise
<null
| CustomResourceDefinition
>
Parameters#
Name | Type |
---|---|
params |
Object |
params.name |
string |
params.namespace? |
string |
data? |
PartialObjectDeep <CustomResourceDefinition > |
Returns#
Promise
<null
| CustomResourceDefinition
>
Inherited from#
defaultSorting#
▸ Protected
defaultSorting(item
): string
Parameters#
Name | Type |
---|---|
item |
Item |
Returns#
string
Inherited from#
KubeObjectStore.defaultSorting
filterItemsOnLoad#
▸ Protected
filterItemsOnLoad(items
): CustomResourceDefinition
[]
Parameters#
Name | Type |
---|---|
items |
CustomResourceDefinition [] |
Returns#
Inherited from#
KubeObjectStore.filterItemsOnLoad
getAllByNs#
▸ getAllByNs(namespace
, strict?
): CustomResourceDefinition
[]
Parameters#
Name | Type | Default value |
---|---|---|
namespace |
string | string [] |
undefined |
strict |
boolean |
false |
Returns#
Inherited from#
getByGroup#
▸ getByGroup(group
, pluralName
): undefined
| CustomResourceDefinition
Parameters#
Name | Type |
---|---|
group |
string |
pluralName |
string |
Returns#
undefined
| CustomResourceDefinition
getById#
▸ getById(id
): undefined
| CustomResourceDefinition
Parameters#
Name | Type |
---|---|
id |
string |
Returns#
undefined
| CustomResourceDefinition
Inherited from#
getByLabel#
▸ getByLabel(labels
): CustomResourceDefinition
[]
Parameters#
Name | Type |
---|---|
labels |
string [] | Partial <Record <string , string >> |
Returns#
Inherited from#
getByName#
▸ getByName(name
, namespace?
): undefined
| CustomResourceDefinition
Parameters#
Name | Type |
---|---|
name |
string |
namespace? |
string |
Returns#
undefined
| CustomResourceDefinition
Inherited from#
getByObject#
▸ getByObject(obj
): undefined
| null
| CustomResourceDefinition
Parameters#
Name | Type |
---|---|
obj |
KubeObject <KubeObjectMetadata <KubeObjectScope >, unknown , unknown > |
Returns#
undefined
| null
| CustomResourceDefinition
getByPath#
▸ getByPath(path
): undefined
| CustomResourceDefinition
Parameters#
Name | Type |
---|---|
path |
string |
Returns#
undefined
| CustomResourceDefinition
Inherited from#
getIndexById#
▸ getIndexById(id
): number
Parameters#
Name | Type |
---|---|
id |
string |
Returns#
number
Inherited from#
getItems#
▸ getItems(): CustomResourceDefinition
[]
Returns#
Inherited from#
getTotalCount#
▸ getTotalCount(): number
Returns#
number
Inherited from#
isSelected#
▸ isSelected(item
): boolean
Parameters#
Name | Type |
---|---|
item |
CustomResourceDefinition |
Returns#
boolean
Inherited from#
isSelectedAll#
▸ isSelectedAll(visibleItems?
): boolean
Parameters#
Name | Type |
---|---|
visibleItems |
CustomResourceDefinition [] |
Returns#
boolean
Inherited from#
load#
▸ load(params
): Promise
<CustomResourceDefinition
>
Parameters#
Name | Type |
---|---|
params |
Object |
params.name |
string |
params.namespace? |
string |
Returns#
Promise
<CustomResourceDefinition
>
Inherited from#
loadAll#
▸ loadAll(__namedParameters?
): Promise
<undefined
| CustomResourceDefinition
[]>
Parameters#
Name | Type |
---|---|
__namedParameters |
KubeObjectStoreLoadAllParams |
Returns#
Promise
<undefined
| CustomResourceDefinition
[]>
Inherited from#
loadFromPath#
▸ loadFromPath(resourcePath
): Promise
<CustomResourceDefinition
>
Parameters#
Name | Type |
---|---|
resourcePath |
string |
Returns#
Promise
<CustomResourceDefinition
>
Inherited from#
loadItem#
▸ Protected
loadItem(params
): Promise
<null
| CustomResourceDefinition
>
Parameters#
Name | Type |
---|---|
params |
Object |
params.name |
string |
params.namespace? |
string |
Returns#
Promise
<null
| CustomResourceDefinition
>
Inherited from#
loadItems#
▸ Protected
loadItems(__namedParameters
): Promise
<CustomResourceDefinition
[]>
Parameters#
Name | Type |
---|---|
__namedParameters |
KubeObjectStoreLoadingParams |
Returns#
Promise
<CustomResourceDefinition
[]>
Inherited from#
mergeItems#
▸ Protected
mergeItems(partialItems
, __namedParameters
): CustomResourceDefinition
[]
Parameters#
Name | Type |
---|---|
partialItems |
CustomResourceDefinition [] |
__namedParameters |
MergeItemsOptions |
Returns#
Inherited from#
patch#
▸ patch(item
, patch
): Promise
<CustomResourceDefinition
>
Parameters#
Name | Type |
---|---|
item |
CustomResourceDefinition |
patch |
Patch |
Returns#
Promise
<CustomResourceDefinition
>
Inherited from#
pickOnlySelected#
▸ pickOnlySelected(items
): CustomResourceDefinition
[]
Parameters#
Name | Type |
---|---|
items |
CustomResourceDefinition [] |
Returns#
Inherited from#
KubeObjectStore.pickOnlySelected
reloadAll#
▸ reloadAll(opts?
): Promise
<undefined
| CustomResourceDefinition
[]>
Parameters#
Name | Type |
---|---|
opts |
Object |
opts.force? |
boolean |
opts.merge? |
boolean |
opts.namespaces? |
string [] |
Returns#
Promise
<undefined
| CustomResourceDefinition
[]>
Inherited from#
remove#
▸ remove(item
): Promise
<void
>
Parameters#
Name | Type |
---|---|
item |
CustomResourceDefinition |
Returns#
Promise
<void
>
Inherited from#
removeItem#
▸ Protected
removeItem(item
, request
): Promise
<void
>
Parameters#
Name | Type |
---|---|
item |
CustomResourceDefinition |
request |
() => Promise <any > |
Returns#
Promise
<void
>
Inherited from#
removeItems#
▸ removeItems(items
): Promise
<void
>
Parameters#
Name | Type |
---|---|
items |
CustomResourceDefinition [] |
Returns#
Promise
<void
>
Inherited from#
removeSelectedItems#
▸ removeSelectedItems(): Promise
<void
>
Returns#
Promise
<void
>
Inherited from#
KubeObjectStore.removeSelectedItems
reset#
▸ reset(): void
Returns#
void
Inherited from#
resetOnError#
▸ Protected
resetOnError(error
): void
Parameters#
Name | Type |
---|---|
error |
any |
Returns#
void
Inherited from#
resetSelection#
▸ resetSelection(): void
Returns#
void
Inherited from#
KubeObjectStore.resetSelection
select#
▸ select(item
): void
Parameters#
Name | Type |
---|---|
item |
CustomResourceDefinition |
Returns#
void
Inherited from#
sortItems#
▸ Protected
sortItems(items
): CustomResourceDefinition
[]
Return items
sorted by the given ordering functions. If two elements of
items
are sorted to the same "index" then the next sorting function is used
to determine where to place them relative to each other. Once the sorting
functions have been all exhausted then the order is unchanged (ie a stable sort).
Parameters#
Name | Type | Description |
---|---|---|
items |
CustomResourceDefinition [] |
the items to be sorted (default: the current items in this store) |
Returns#
Overrides#
subscribe#
▸ subscribe(__namedParameters?
): Disposer
Parameters#
Name | Type |
---|---|
__namedParameters |
KubeObjectStoreSubscribeParams |
Returns#
Disposer
Inherited from#
toggleSelection#
▸ toggleSelection(item
): void
Parameters#
Name | Type |
---|---|
item |
CustomResourceDefinition |
Returns#
void
Inherited from#
KubeObjectStore.toggleSelection
toggleSelectionAll#
▸ toggleSelectionAll(visibleItems?
): void
Parameters#
Name | Type |
---|---|
visibleItems |
CustomResourceDefinition [] |
Returns#
void
Inherited from#
KubeObjectStore.toggleSelectionAll
unselect#
▸ unselect(item
): void
Parameters#
Name | Type |
---|---|
item |
CustomResourceDefinition |
Returns#
void
Inherited from#
update#
▸ update(item
, data
): Promise
<CustomResourceDefinition
>
Parameters#
Name | Type |
---|---|
item |
CustomResourceDefinition |
data |
PartialObjectDeep <CustomResourceDefinition > |
Returns#
Promise
<CustomResourceDefinition
>
Inherited from#
updateFromEventsBuffer#
▸ Protected
updateFromEventsBuffer(): void
Returns#
void
Inherited from#
KubeObjectStore.updateFromEventsBuffer
updateItem#
▸ Protected
updateItem(item
, request
): Promise
<CustomResourceDefinition
>
Parameters#
Name | Type |
---|---|
item |
CustomResourceDefinition |
request |
() => Promise <CustomResourceDefinition > |
Returns#
Promise
<CustomResourceDefinition
>