Skip to content

func GetConnConfig, GetRegion, LookupSpec

Jihoon Seo edited this page May 12, 2020 · 1 revision

1. GetConnConfigList

Call chain:

  1. GET http://tb_ip:tb_port/tumblebug/connConfig (in apiserver.go)
  2. func RestGetConnConfigList(c echo.Context) error (in common/utility.go)
  3. func GetConnConfigList() (ConnConfigList, error) (in common/utility.go)

2. GetConnConfig

Call chain:

  1. GET http://tb_ip:tb_port/tumblebug/connConfig/:connConfigName (in apiserver.go)
  2. func RestGetConnConfig(c echo.Context) error (in common/utility.go)
  3. func GetConnConfig(ConnConfigName string) (ConnConfig, error) (in common/utility.go)

3. GetRegionList

Call chain:

  1. GET http://tb_ip:tb_port/tumblebug/region (in apiserver.go)
  2. func RestGetRegionList(c echo.Context) error (in common/utility.go)
  3. func GetRegionList() (RegionList, error) (in common/utility.go)

4. GetRegion

Call chain:

  1. GET http://tb_ip:tb_port/tumblebug/region/:regionName (in apiserver.go)
  2. func RestGetRegion(c echo.Context) error (in common/utility.go)
  3. func GetRegion(RegionName string) (Region, error) (in common/utility.go)

5. LookupSpecList

Call chain:

  1. GET http://tb_ip:tb_port/tumblebug/lookupSpec (in apiserver.go)
  2. func RestLookupSpecList(c echo.Context) error (in mcir/spec.go)
  3. func LookupSpecList(connConfig string) (SpiderSpecList, error) (in mcir/spec.go)

Usage: Please refer to lookupSpecList.sh

curl -sX GET http://localhost:1323/tumblebug/lookupSpec -H 'Content-Type: application/json' -d \
	'{ 
		"connectionName": "'${CONN_CONFIG[INDEX]}'"
	}' | json_pp

6. LookupSpec

Call chain:

  1. GET http://tb_ip:tb_port/tumblebug/lookupSpec/:specName (in apiserver.go)
  2. func RestLookupSpec(c echo.Context) error (in mcir/spec.go)
  3. func lookupSpec(u *specReq) (SpiderSpecInfo, error) (in mcir/spec.go)

Usage: Please refer to lookupSpec.sh

curl -sX GET http://localhost:1323/tumblebug/lookupSpec/${SPEC_NAME[INDEX]} -H 'Content-Type: application/json' -d \
	'{ 
		"connectionName": "'${CONN_CONFIG[INDEX]}'"
	}' | json_pp
Clone this wiki locally