This repository has been archived by the owner on Nov 7, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Generated code for loading list of services
Signed-off-by: Christopher Hein <me@christopherhein.com>
- Loading branch information
1 parent
7008af8
commit 4c6e4c5
Showing
16 changed files
with
140 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
package base | ||
|
||
import ( | ||
awsclient "github.com/awslabs/aws-service-operator/pkg/client/clientset/versioned/typed/service-operator.aws/v1alpha1" | ||
"github.com/awslabs/aws-service-operator/pkg/config" | ||
"github.com/awslabs/aws-service-operator/pkg/operators/cloudformationtemplate" | ||
"github.com/awslabs/aws-service-operator/pkg/operators/dynamodb" | ||
"github.com/awslabs/aws-service-operator/pkg/operators/ecrrepository" | ||
"github.com/awslabs/aws-service-operator/pkg/operators/s3bucket" | ||
"github.com/awslabs/aws-service-operator/pkg/operators/snssubscription" | ||
"github.com/awslabs/aws-service-operator/pkg/operators/snstopic" | ||
"github.com/awslabs/aws-service-operator/pkg/operators/sqsqueue" | ||
opkit "github.com/christopherhein/operator-kit" | ||
) | ||
|
||
type base struct { | ||
config *config.Config | ||
context *opkit.Context | ||
awsClientset awsclient.ServiceoperatorV1alpha1Interface | ||
} | ||
|
||
func New( | ||
config *config.Config, | ||
context *opkit.Context, | ||
awsClientset awsclient.ServiceoperatorV1alpha1Interface, | ||
) *base { | ||
return &base{ | ||
config: config, | ||
context: context, | ||
awsClientset: awsClientset, | ||
} | ||
} | ||
|
||
func (b *base) Watch(namespace string, stopCh chan struct{}) (err error) { | ||
cloudformationtemplateoperator := cloudformationtemplate.NewOperator(b.config, b.context, b.awsClientset) | ||
err = cloudformationtemplateoperator.StartWatch(namespace, stopCh) | ||
if err != nil { | ||
return err | ||
} | ||
dynamodboperator := dynamodb.NewOperator(b.config, b.context, b.awsClientset) | ||
err = dynamodboperator.StartWatch(namespace, stopCh) | ||
if err != nil { | ||
return err | ||
} | ||
ecrrepositoryoperator := ecrrepository.NewOperator(b.config, b.context, b.awsClientset) | ||
err = ecrrepositoryoperator.StartWatch(namespace, stopCh) | ||
if err != nil { | ||
return err | ||
} | ||
s3bucketoperator := s3bucket.NewOperator(b.config, b.context, b.awsClientset) | ||
err = s3bucketoperator.StartWatch(namespace, stopCh) | ||
if err != nil { | ||
return err | ||
} | ||
snssubscriptionoperator := snssubscription.NewOperator(b.config, b.context, b.awsClientset) | ||
err = snssubscriptionoperator.StartWatch(namespace, stopCh) | ||
if err != nil { | ||
return err | ||
} | ||
snstopicoperator := snstopic.NewOperator(b.config, b.context, b.awsClientset) | ||
err = snstopicoperator.StartWatch(namespace, stopCh) | ||
if err != nil { | ||
return err | ||
} | ||
sqsqueueoperator := sqsqueue.NewOperator(b.config, b.context, b.awsClientset) | ||
err = sqsqueueoperator.StartWatch(namespace, stopCh) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.