MCPcopy Create free account
hub / github.com/apecloud/myduckserver / parseRegionFromEndpoint

Function parseRegionFromEndpoint

storage/object_storage.go:172–183  ·  view source on GitHub ↗
(provider, endpoint string)

Source from the content-addressed store, hash-verified

170}
171
172func parseRegionFromEndpoint(provider, endpoint string) (string, error) {
173 region := ""
174 if provider == "s3" {
175 region = parseS3RegionCode(endpoint)
176 if region == "" {
177 return "", fmt.Errorf("missing region in endpoint: %s", endpoint)
178 }
179 } else {
180 region = DummyRegion
181 }
182 return region, nil
183}
184
185func parseS3RegionCode(endpoint string) string {
186 if endpoint == "" {

Callers 1

ConstructStorageConfigFunction · 0.85

Calls 1

parseS3RegionCodeFunction · 0.85

Tested by

no test coverage detected