Documentation ¶
Overview ¶
Package template provides conversion of cluster templates to Omni resources.
Index ¶
- type SyncResult
- type Template
- func (t *Template) ClusterName() (string, error)
- func (t *Template) Delete(ctx context.Context, st state.State) (*SyncResult, error)
- func (t *Template) Sync(ctx context.Context, st state.State) (*SyncResult, error)
- func (t *Template) Translate() ([]resource.Resource, error)
- func (t *Template) Validate() error
- type UpdateChange
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SyncResult ¶
type SyncResult struct { // Resources to create. Create []resource.Resource // Resources to update. Update []UpdateChange // Resources to delete split by phases. Destroy [][]resource.Resource }
SyncResult describes the actions to perform to sync the template resources.
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
Template is a cluster template.
func WithCluster ¶
WithCluster creates an empty template which contains only cluster model.
Such template can be used for reading a cluster status, deleting a cluster, etc.
func (*Template) ClusterName ¶
ClusterName returns the name of the cluster associated with the template.
func (*Template) Delete ¶
Delete returns a sync result which lists what needs to be deleted from state to remove template from the cluster.
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
models
Package models provides cluster template models (for each sub-document of multi-doc YAML).
|
Package models provides cluster template models (for each sub-document of multi-doc YAML). |
Package operations provides higher level operations on cluster templates.
|
Package operations provides higher level operations on cluster templates. |
internal/statustree
Package statustree contains helpers to render cluster status to the terminal.
|
Package statustree contains helpers to render cluster status to the terminal. |
internal/utils
Package utils contains various utility functions for template operations.
|
Package utils contains various utility functions for template operations. |
Click to show internal directories.
Click to hide internal directories.