Skip to content

Discuss: What's default view for cmd/main.go? #45

@fanminshi

Description

@fanminshi

Before: the cmd/main.go is generated based on user inputs Kind and APIVersion such as PlayService kind. The reason behind this is that users can just watch their customized resource out of the box as the default behavior.

func main() {
	namespace := "default"
        // old Watch API.
	sdk.Watch(api.PlayServicePlural, namespace, api.PlayService)
 	sdk.Handle(&stub.Handler{})
 	sdk.Run(context.TODO())
}

Now: Should we change the above default behavior to watch on Deployment instead?

func main() {
	namespace := "default"
	sdk.Watch("apps/v1", "Deployment", namespace)
 	sdk.Handle(&stub.Handler{})
 	sdk.Run(context.TODO())
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions