Pascal Fischer 3aee3d73f5 add ibm cloud
2024-02-09 11:03:39 +01:00
2021-04-18 20:02:38 -04:00
2024-02-08 17:49:31 +01:00
2024-02-08 17:36:22 +01:00
2024-02-09 11:03:39 +01:00
2021-05-03 23:43:15 -04:00
2021-04-18 20:03:11 -04:00
2024-02-09 11:03:39 +01:00
2021-04-18 20:03:11 -04:00
2021-04-18 20:03:49 -04:00
2021-04-18 20:02:38 -04:00
2021-04-18 20:03:11 -04:00
2024-02-08 17:49:31 +01:00
2021-04-18 20:03:11 -04:00
2021-04-18 20:03:11 -04:00
2021-04-18 20:03:11 -04:00

libdetectcloud

http.Client timeout is set to 300ms. Sometimes hitting the metadata service to fast will return empty instead of the cloud provider detected.

    package main

    import (
    	"fmt"
    	"gitlab.com/taskfitio/lib/detectcloud"
    )

    func main() {

        // detectcloud.Detect() will return an empty string or
        // Amazon Web Services, Microsoft Azure, Digital Ocean
        // Google Compute Engine, OpenStack, SoftLayer, Vultr
        // K8S Container, Container

    	fmt.Println(detectcloud.Detect())

    }
S
Description
No description provided
Readme Apache-2.0 67 KiB
Languages
Go 95.9%
Makefile 4.1%