Merge branch 'patch-1' of https://github.com/mr-c/arvados into mr-c-patch-1
[arvados.git] / lib / controller / api / routable.go
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 // Package api provides types used by controller/server-component
6 // packages.
7 package api
8
9 import "context"
10
11 // A RoutableFunc calls an API method (sometimes via a wrapped
12 // RoutableFunc) that has real argument types.
13 //
14 // (It is used by ctrlctx to manage database transactions, so moving
15 // it to the router package would cause a circular dependency
16 // router->arvadostest->ctrlctx->router.)
17 type RoutableFunc func(ctx context.Context, opts interface{}) (interface{}, error)