Created
March 23, 2018 15:53
-
-
Save bartosh/42c2a4c75b6278b404d7642373710082 to your computer and use it in GitHub Desktop.
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
// allocate issues Allocate gRPC call to the device plugin. | |
func (e *endpointImpl) allocate(devs []string, podAnnotations map[string]string) (*pluginapi.AllocateResponse, error) { | |
if e.isStopped() { | |
return nil, fmt.Errorf(errEndpointStopped, e) | |
} | |
return e.client.Allocate(context.Background(), &pluginapi.AllocateRequest{ | |
ContainerRequests: []*pluginapi.ContainerAllocateRequest{ | |
{ | |
DevicesIDs: devs, | |
PodAnnotations: podAnnotations, | |
}, | |
}, | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment