argo-cd/pkg/apiclient/applicationset/forwarder_overwrite.go
Peter Jiang 19b41b9d31
feat: ApplicationSet watch API (#26409)
Signed-off-by: nitishfy <justnitish06@gmail.com>
Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
Co-authored-by: nitishfy <justnitish06@gmail.com>
2026-02-26 10:07:00 -05:00

22 lines
509 B
Go

package applicationset
import (
"errors"
"github.com/argoproj/pkg/v2/grpc/http"
//nolint:staticcheck
"github.com/golang/protobuf/proto"
"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
)
func init() {
forward_ApplicationSetService_Watch_0 = http.NewStreamForwarder(func(message proto.Message) (string, error) {
event, ok := message.(*v1alpha1.ApplicationSetWatchEvent)
if !ok {
return "", errors.New("unexpected message type")
}
return event.ApplicationSet.Name, nil
})
}