resources: aws: ec2: Move chanStruct type out of longpollWatch
This commit is contained in:
@@ -84,6 +84,12 @@ type AwsEc2Res struct {
|
||||
client *ec2.EC2 // client session for AWS API calls
|
||||
}
|
||||
|
||||
// chanStruct defines the type for a channel used to pass events and errors to watch.
|
||||
type chanStruct struct {
|
||||
str string
|
||||
err error
|
||||
}
|
||||
|
||||
// Default returns some sensible defaults for this resource.
|
||||
func (obj *AwsEc2Res) Default() Res {
|
||||
return &AwsEc2Res{
|
||||
@@ -171,10 +177,6 @@ func (obj *AwsEc2Res) longpollWatch() error {
|
||||
if err := obj.Running(); err != nil {
|
||||
return err
|
||||
}
|
||||
type chanStruct struct {
|
||||
str string
|
||||
err error
|
||||
}
|
||||
awsChan := make(chan *chanStruct)
|
||||
closeChan := make(chan struct{})
|
||||
ctx, cancel := context.WithCancel(context.TODO())
|
||||
|
||||
Reference in New Issue
Block a user