Skip to content

Commit

Permalink
chore: Remove InstancePool function (#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
mojtaba-esk authored Jul 26, 2024
1 parent 0379bca commit f218443
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 120 deletions.
77 changes: 0 additions & 77 deletions pkg/instance/pool.go

This file was deleted.

43 changes: 0 additions & 43 deletions pkg/knuu/instance_old.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ type Executor struct {
*Instance
}

type InstancePool struct {
instance.InstancePool
}

type InstanceState instance.InstanceState

const (
Expand Down Expand Up @@ -321,45 +317,6 @@ func BatchDestroy(instances ...*Instance) error {
return instance.BatchDestroy(context.Background(), ins...)
}

// Deprecated: Use the new package knuu instead.
func (i *Instance) CreatePool(amount int) (*InstancePool, error) {
pool, err := i.Instance.NewPool(amount)
if err != nil {
return nil, err
}
return &InstancePool{*pool}, nil
}

// Deprecated: Use the new package knuu instead.
func (i *InstancePool) StartWithoutWait() error {
return i.InstancePool.StartWithoutWait(context.Background())
}

// Deprecated: Use the new package knuu instead.
func (i *InstancePool) Start() error {
return i.InstancePool.Start(context.Background())
}

// Deprecated: Use the new package knuu instead.
func (i *InstancePool) Destroy() error {
return i.InstancePool.Destroy(context.Background())
}

// Deprecated: Use the new package knuu instead.
func (i *InstancePool) WaitInstancePoolIsRunning() error {
return i.InstancePool.WaitInstancePoolIsRunning(context.Background())
}

// Deprecated: Use the new package knuu instead.
func (i *InstancePool) Instances() []*Instance {
instances := i.InstancePool.Instances()
newInstances := make([]*Instance, len(instances))
for i, instance := range instances {
newInstances[i] = &Instance{*instance}
}
return newInstances
}

// Deprecated: Use the new package knuu instead.
func (i *Instance) Labels() map[string]string {
return i.Instance.Labels()
Expand Down

0 comments on commit f218443

Please sign in to comment.