MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / withHostCallbackPluginID

Function withHostCallbackPluginID

internal/pluginhost/host_callbacks.go:76–88  ·  view source on GitHub ↗
(ctx context.Context, pluginID string)

Source from the content-addressed store, hash-verified

74type hostCallbackPluginIDKey struct{}
75
76func withHostCallbackPluginID(ctx context.Context, pluginID string) context.Context {
77 pluginID = strings.TrimSpace(pluginID)
78 if pluginID == "" {
79 if ctx == nil {
80 return context.Background()
81 }
82 return ctx
83 }
84 if ctx == nil {
85 ctx = context.Background()
86 }
87 return context.WithValue(ctx, hostCallbackPluginIDKey{}, pluginID)
88}
89
90func hostCallbackPluginIDFromContext(ctx context.Context) string {
91 if ctx == nil {

Callers 3

openMethod · 0.85
cliproxyHostCallFunction · 0.85
windowsHostCallFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected