mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-07 11:27:50 +00:00
renamed functions
This commit is contained in:
parent
9f6694d8b4
commit
c654fd009a
2 changed files with 5 additions and 5 deletions
|
|
@ -702,13 +702,13 @@ func (c *Client) SnapshotTable(ctx context.Context, qtid dax.QualifiedTableID) e
|
|||
return nil
|
||||
}
|
||||
|
||||
func (c *Client) GetDatabaseWorkerCount(ctx context.Context, orgID string, databaseID string) (int, error) {
|
||||
func (c *Client) WorkerCount(ctx context.Context, orgID string, databaseID string) (int, error) {
|
||||
baseEndpoint := c.address.WithScheme(defaultScheme)
|
||||
url := fmt.Sprintf("%s/database-worker-count/%s/%s", baseEndpoint, orgID, databaseID)
|
||||
url := fmt.Sprintf("%s/worker-count/%s/%s", baseEndpoint, orgID, databaseID)
|
||||
|
||||
resp, err := c.httpClient.Get(url)
|
||||
if err != nil {
|
||||
return 0, errors.Wrap(err, "getting database-worker-count")
|
||||
return 0, errors.Wrap(err, "getting worker-count")
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ func Handler(c *controller.Controller) http.Handler {
|
|||
router.HandleFunc("/database-by-name", server.postDatabaseByName).Methods("POST").Name("PostDatabaseByName")
|
||||
router.HandleFunc("/databases", server.postDatabases).Methods("POST").Name("PostDatabases")
|
||||
router.HandleFunc("/database/options", server.patchDatabaseOptions).Methods("PATCH").Name("PatchDatabaseOptions")
|
||||
router.HandleFunc("/database-worker-count/{organization-id}/{database-id}", server.getDatabaseNumberOfWorkers).Methods("GET").Name("DatabaseWorkers")
|
||||
router.HandleFunc("/worker-count/{organization-id}/{database-id}", server.WorkerCount).Methods("GET").Name("DatabaseWorkers")
|
||||
|
||||
router.HandleFunc("/create-table", server.postCreateTable).Methods("POST").Name("PostCreateTable")
|
||||
router.HandleFunc("/drop-table", server.postDropTable).Methods("POST").Name("PostDropTable")
|
||||
|
|
@ -216,7 +216,7 @@ func (s *server) patchDatabaseOptions(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
// create a response struct
|
||||
func (s *server) getDatabaseNumberOfWorkers(w http.ResponseWriter, r *http.Request) {
|
||||
func (s *server) WorkerCount(w http.ResponseWriter, r *http.Request) {
|
||||
// get the context
|
||||
ctx := r.Context()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue