Documentation ¶
Index ¶
Constants ¶
View Source
const ( // StatusDeprovisioned indicates the corresponding cluster subscription status StatusDeprovisioned = "Deprovisioned" // StatusArchived indicates the corresponding cluster subscription status StatusArchived = "Archived" // StatusReserved means the cluster has reserved resources, but isn't initialized yet. StatusReserved = "Reserved" )
Variables ¶
View Source
var ( // DefaultStatusNegativeFilters are filters that are applied to the AMS API subscriptions query when the filters are empty // We are either not interested in clusters in these states (Archived, Deprovisioned) or the cluster's // initialization hasn't finished yet (Reserved), meaning the cluster is not ready to start sending Insights archives, // as it might not even have a Cluster UUID assigned yet. When the initialization succeeds or fails, the cluster's // state becomes either Active or Deprovisioned. DefaultStatusNegativeFilters = []string{StatusArchived, StatusDeprovisioned, StatusReserved} )
Functions ¶
This section is empty.
Types ¶
type AMSClient ¶
type AMSClient interface { GetClustersForOrganization(types.OrgID, []string, []string) ( clusterInfoList []types.ClusterInfo, err error, ) GetClusterDetailsFromExternalClusterID(types.ClusterName) ( clusterInfo types.ClusterInfo, ) GetSingleClusterInfoForOrganization(types.OrgID, types.ClusterName) ( types.ClusterInfo, error, ) }
AMSClient allow us to interact the AMS API
func NewAMSClient ¶
func NewAMSClient(conf Configuration) (AMSClient, error)
NewAMSClient create an AMSClient from the configuration
func NewAMSClientWithTransport ¶
func NewAMSClientWithTransport(conf Configuration, transport http.RoundTripper) (AMSClient, error)
NewAMSClientWithTransport creates an AMSClient from the configuration, enabling to use a transport wrapper
type Configuration ¶
type Configuration struct { Token string `mapstructure:"token" toml:"token"` ClientID string `mapstructure:"client_id" toml:"client_id"` ClientSecret string `mapstructure:"client_secret" toml:"client_secret"` URL string `mapstructure:"url" toml:"url"` PageSize int `mapstructure:"page_size" toml:"page_size"` }
Configuration represents the configuration of the AMS API client
Click to show internal directories.
Click to hide internal directories.