github.com/wanddynosios/cli/v8@v8.7.9-0.20240221182337-1a92e3a7017f/api/cloudcontroller/ccv3/sidecar.go (about) 1 package ccv3 2 3 import ( 4 "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" 5 "code.cloudfoundry.org/cli/resources" 6 ) 7 8 func (client *Client) GetProcessSidecars(processGuid string) ([]resources.Sidecar, Warnings, error) { 9 var sidecars []resources.Sidecar 10 11 _, warnings, err := client.MakeListRequest(RequestParams{ 12 RequestName: internal.GetProcessSidecarsRequest, 13 URIParams: internal.Params{"process_guid": processGuid}, 14 ResponseBody: resources.Sidecar{}, 15 AppendToList: func(item interface{}) error { 16 sidecars = append(sidecars, item.(resources.Sidecar)) 17 return nil 18 }, 19 }) 20 21 return sidecars, warnings, err 22 }