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

Function getServerOperationVariables

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

Source from the content-addressed store, hash-verified

175}
176
177func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) {
178 osv := ctx.Value(ContextOperationServerVariables)
179 if osv != nil {
180 if operationVariables, ok := osv.(map[string]map[string]string); !ok {
181 return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv)
182 } else {
183 variables, ok := operationVariables[endpoint]
184 if ok {
185 return variables, nil
186 }
187 }
188 }
189 return getServerVariables(ctx)
190}
191
192// ServerURLWithContext returns a new server URL given an endpoint
193func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) {

Callers 1

ServerURLWithContextMethod · 0.85

Calls 2

reportErrorFunction · 0.85
getServerVariablesFunction · 0.85

Tested by

no test coverage detected