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

Function getServerIndex

admin/client/configuration.go:140–149  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

138}
139
140func getServerIndex(ctx context.Context) (int, error) {
141 si := ctx.Value(ContextServerIndex)
142 if si != nil {
143 if index, ok := si.(int); ok {
144 return index, nil
145 }
146 return 0, reportError("Invalid type %T should be int", si)
147 }
148 return 0, nil
149}
150
151func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) {
152 osi := ctx.Value(ContextOperationServerIndices)

Callers 1

getServerOperationIndexFunction · 0.85

Calls 1

reportErrorFunction · 0.85

Tested by

no test coverage detected