MCPcopy
hub / github.com/NVIDIA/k8s-device-plugin / getPluginSocketPath

Function getPluginSocketPath

internal/plugin/server.go:103–107  ·  view source on GitHub ↗

getPluginSocketPath returns the socket to use for the specified resource.

(resource spec.ResourceName)

Source from the content-addressed store, hash-verified

101
102// getPluginSocketPath returns the socket to use for the specified resource.
103func getPluginSocketPath(resource spec.ResourceName) string {
104 _, name := resource.Split()
105 pluginName := "nvidia-" + name
106 return filepath.Join(pluginapi.DevicePluginPath, pluginName) + ".sock"
107}
108
109func (plugin *nvidiaDevicePlugin) initialize() {
110 plugin.server = grpc.NewServer([]grpc.ServerOption{}...)

Callers 1

Calls 1

SplitMethod · 0.45

Tested by

no test coverage detected