MCPcopy Index your code
hub / github.com/FunctionStream/function-stream / getServerOperationIndex

Function getServerOperationIndex

admin/client/configuration.go:151–164  ·  view source on GitHub ↗
(ctx context.Context, endpoint string)

Source from the content-addressed store, hash-verified

149}
150
151func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) {
152 osi := ctx.Value(ContextOperationServerIndices)
153 if osi != nil {
154 if operationIndices, ok := osi.(map[string]int); !ok {
155 return 0, reportError("Invalid type %T should be map[string]int", osi)
156 } else {
157 index, ok := operationIndices[endpoint]
158 if ok {
159 return index, nil
160 }
161 }
162 }
163 return getServerIndex(ctx)
164}
165
166func getServerVariables(ctx context.Context) (map[string]string, error) {
167 sv := ctx.Value(ContextServerVariables)

Callers 1

ServerURLWithContextMethod · 0.85

Calls 2

reportErrorFunction · 0.85
getServerIndexFunction · 0.85

Tested by

no test coverage detected