github.com/argoproj/argo-cd@v1.8.7/pkg/apiclient/application/forwarder_overwrite.go (about)

     1  package application
     2  
     3  import (
     4  	"errors"
     5  
     6  	// nolint:staticcheck
     7  	"github.com/golang/protobuf/proto"
     8  
     9  	"github.com/argoproj/pkg/grpc/http"
    10  
    11  	"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
    12  )
    13  
    14  func init() {
    15  	forward_ApplicationService_PodLogs_0 = http.StreamForwarder
    16  	forward_ApplicationService_WatchResourceTree_0 = http.StreamForwarder
    17  	forward_ApplicationService_Watch_0 = http.NewStreamForwarder(func(message proto.Message) (string, error) {
    18  		event, ok := message.(*v1alpha1.ApplicationWatchEvent)
    19  		if !ok {
    20  			return "", errors.New("unexpected message type")
    21  		}
    22  		return event.Application.Name, nil
    23  	})
    24  	forward_ApplicationService_List_0 = http.UnaryForwarder
    25  	forward_ApplicationService_ManagedResources_0 = http.UnaryForwarder
    26  }