Documentation ¶
Index ¶
- func EnsureDir(dirname string) error
- func Exists(filepath string) bool
- func HasAPIResource(apiResources []*discoverypb.APIResource, gvk schema.GroupVersionKind) bool
- func PrintAPIResource(apiResources []*discoverypb.APIResource) bool
- type BranchCtx
- type BranchStore
- func (r *BranchStore) Delete(ctx context.Context, branchSet repository.BranchSet) error
- func (r *BranchStore) GetCheckedOut() (*BranchCtx, error)
- func (r *BranchStore) GetStore() store.Storer[*BranchCtx]
- func (r *BranchStore) Update(ctx context.Context, branches []*branchpb.BranchObject) error
- func (r *BranchStore) UpdateBranchCtx(branchCtx *BranchCtx) error
- func (r *BranchStore) WatchAPIResources(ctx context.Context, opts ...resourceclient.ListOption) (watch.WatchInterface[*api.ResourceContext], error)
- func (r *BranchStore) WatchBranches(ctx context.Context, opts ...store.ListOption) (watch.WatchInterface[*BranchCtx], error)
- type CheckedOut
- type Choreo
- type ChoreoStatus
- type Config
- type ConfigValidator
- type Event
- type Node
- type NodeConfig
- type NotCheckedOut
- type Runner
- type RunnerStatus
- type Snapshot
- type SnapshotManager
- func (r *SnapshotManager) Create(id string, apiResources []*discoverypb.APIResource, ...)
- func (r *SnapshotManager) Delete(req *snapshotpb.Delete_Request) (*snapshotpb.Delete_Response, error)
- func (r *SnapshotManager) Diff(req *snapshotpb.Diff_Request) (*snapshotpb.Diff_Response, error)
- func (r *SnapshotManager) Get(req *snapshotpb.Get_Request) (*snapshotpb.Get_Response, error)
- func (r *SnapshotManager) List(req *snapshotpb.List_Request) (*snapshotpb.List_Response, error)
- func (r *SnapshotManager) Result(_ *snapshotpb.Result_Request) (*snapshotpb.Result_Response, error)
- type SnapshotNode
- type State
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasAPIResource ¶ added in v0.0.9
func HasAPIResource(apiResources []*discoverypb.APIResource, gvk schema.GroupVersionKind) bool
func PrintAPIResource ¶ added in v0.0.9
func PrintAPIResource(apiResources []*discoverypb.APIResource) bool
Types ¶
type BranchStore ¶
type BranchStore struct {
// contains filtered or unexported fields
}
func NewBranchStore ¶
func NewBranchStore(choreo *choreo) *BranchStore
func (*BranchStore) Delete ¶
func (r *BranchStore) Delete(ctx context.Context, branchSet repository.BranchSet) error
func (*BranchStore) GetCheckedOut ¶ added in v0.0.9
func (r *BranchStore) GetCheckedOut() (*BranchCtx, error)
func (*BranchStore) Update ¶
func (r *BranchStore) Update(ctx context.Context, branches []*branchpb.BranchObject) error
func (*BranchStore) UpdateBranchCtx ¶ added in v0.0.15
func (r *BranchStore) UpdateBranchCtx(branchCtx *BranchCtx) error
func (*BranchStore) WatchAPIResources ¶
func (r *BranchStore) WatchAPIResources(ctx context.Context, opts ...resourceclient.ListOption) (watch.WatchInterface[*api.ResourceContext], error)
func (*BranchStore) WatchBranches ¶
func (r *BranchStore) WatchBranches(ctx context.Context, opts ...store.ListOption) (watch.WatchInterface[*BranchCtx], error)
type CheckedOut ¶
type CheckedOut struct { Choreo *choreo Client resourceclient.Client }
func (*CheckedOut) Activate ¶
func (r *CheckedOut) Activate(ctx context.Context, branchCtx *BranchCtx) error
func (*CheckedOut) DeActivate ¶
func (r *CheckedOut) DeActivate(_ context.Context, branchCtx *BranchCtx) error
func (*CheckedOut) String ¶
func (r *CheckedOut) String() string
type Choreo ¶
type Choreo interface { Get(ctx context.Context, req *choreopb.Get_Request) (*choreopb.Get_Response, error) Apply(ctx context.Context, req *choreopb.Apply_Request) (*choreopb.Apply_Response, error) Start(ctx context.Context) GetRootChoreoInstance() instance.ChoreoInstance GetBranchStore() *BranchStore Runner() Runner SnapshotManager() *SnapshotManager // updates resource (yaml) in the input directory Store(obj runtime.Unstructured) error // remove resource (yaml) from the input directory Destroy(obj runtime.Unstructured) error GetClient() resourceclient.Client GetContext() context.Context GetStatus() *Status GetConfig() *genericclioptions.ChoreoConfig }
func New ¶
func New(cfg *genericclioptions.ChoreoConfig) Choreo
type ChoreoStatus ¶ added in v0.0.9
type ChoreoStatus struct { Status bool Reason string RootChoreoInstance instance.ChoreoInstance ChoreoCtx *choreopb.ChoreoContext }
func Failed ¶ added in v0.0.9
func Failed(msg string) ChoreoStatus
func Initializing ¶ added in v0.0.9
func Initializing() ChoreoStatus
func Success ¶ added in v0.0.9
func Success(ci instance.ChoreoInstance, choreoCtx *choreopb.ChoreoContext) ChoreoStatus
type Config ¶ added in v0.0.9
type Config struct {
*unstructured.Unstructured
}
func (*Config) GetConfigs ¶ added in v0.0.15
type ConfigValidator ¶ added in v0.0.15
type ConfigValidator struct {
// contains filtered or unexported fields
}
func NewConfigValidator ¶ added in v0.0.15
func NewConfigValidator(choreo Choreo) *ConfigValidator
type Node ¶ added in v0.0.15
type Node struct {
*unstructured.Unstructured
}
func (*Node) GetPlatformType ¶ added in v0.0.15
func (*Node) GetProvider ¶ added in v0.0.15
func (*Node) GetVersion ¶ added in v0.0.15
type NodeConfig ¶ added in v0.0.15
type NodeConfig struct { Node *Node RunningConfig any // json struct Configs []*unstructured.Unstructured // json struct }
type NotCheckedOut ¶
type NotCheckedOut struct { Commit *object.Commit Choreo *choreo Client resourceclient.Client }
func (*NotCheckedOut) Activate ¶
func (r *NotCheckedOut) Activate(ctx context.Context, branchCtx *BranchCtx) error
func (*NotCheckedOut) DeActivate ¶
func (r *NotCheckedOut) DeActivate(_ context.Context, branchCtx *BranchCtx) error
func (*NotCheckedOut) String ¶
func (r *NotCheckedOut) String() string
type Runner ¶ added in v0.0.9
type Runner interface { //AddResourceClientAndContext(ctx context.Context, client resourceclient.Client) Start(ctx context.Context, bctx *BranchCtx) (*runnerpb.Start_Response, error) Stop() RunOnce(ctx context.Context, bctx *BranchCtx, stream runnerpb.Runner_OnceServer) error Load(ctx context.Context, bctx *BranchCtx) error }
type RunnerStatus ¶ added in v0.0.9
type RunnerStatus int
const ( RunnerStatus_Stopped RunnerStatus = iota RunnerStatus_Running RunnerStatus_Once )
func (RunnerStatus) String ¶ added in v0.0.9
func (rs RunnerStatus) String() string
type Snapshot ¶ added in v0.0.11
type Snapshot struct { ID string CreatedAt time.Time APIResources []*discoverypb.APIResource //Input Inventory inventory.Inventory RunResponse *runnerpb.Once_Response_RunResponse }
type SnapshotManager ¶ added in v0.0.11
type SnapshotManager struct {
// contains filtered or unexported fields
}
func NewSnapshotManager ¶ added in v0.0.11
func NewSnapshotManager() *SnapshotManager
func (*SnapshotManager) Create ¶ added in v0.0.11
func (r *SnapshotManager) Create(id string, apiResources []*discoverypb.APIResource, inventory inventory.Inventory, rsp *runnerpb.Once_Response_RunResponse)
func (*SnapshotManager) Delete ¶ added in v0.0.11
func (r *SnapshotManager) Delete(req *snapshotpb.Delete_Request) (*snapshotpb.Delete_Response, error)
func (*SnapshotManager) Diff ¶ added in v0.0.11
func (r *SnapshotManager) Diff(req *snapshotpb.Diff_Request) (*snapshotpb.Diff_Response, error)
func (*SnapshotManager) Get ¶ added in v0.0.11
func (r *SnapshotManager) Get(req *snapshotpb.Get_Request) (*snapshotpb.Get_Response, error)
func (*SnapshotManager) List ¶ added in v0.0.11
func (r *SnapshotManager) List(req *snapshotpb.List_Request) (*snapshotpb.List_Response, error)
func (*SnapshotManager) Result ¶ added in v0.0.17
func (r *SnapshotManager) Result(_ *snapshotpb.Result_Request) (*snapshotpb.Result_Response, error)
type SnapshotNode ¶ added in v0.0.11
type SnapshotNode struct {
// contains filtered or unexported fields
}
type Status ¶ added in v0.0.9
type Status struct { ChoreoStatus // contains filtered or unexported fields }
func (*Status) Changed ¶ added in v0.0.9
func (r *Status) Changed(newChoreoCtx *choreopb.ChoreoContext) bool
func (*Status) Get ¶ added in v0.0.9
func (r *Status) Get() ChoreoStatus
func (*Status) Set ¶ added in v0.0.9
func (r *Status) Set(s ChoreoStatus)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.