Documentation ¶
Index ¶
- Variables
- func IsDeletedErr(err error) bool
- type APIError
- type Client
- func (c *Client) Auth(ctx context.Context, token string) error
- func (c *Client) Bundle(ctx context.Context, clusterID int64) ([]byte, error)
- func (c *Client) Connect(ctx context.Context, clusterID int64) (*model.ClusterConnection, error)
- func (c *Client) CreateAllowlistRule(ctx context.Context, clusterID int64, address string) ([]model.AllowedIP, error)
- func (c *Client) CreateCluster(ctx context.Context, req *model.ClusterCreateRequest) (*model.ClusterRequest, error)
- func (c *Client) CreateClusterVPCPeering(ctx context.Context, clusterID int64, req *model.VPCPeeringRequest) (*model.VPCPeering, error)
- func (c *Client) DeleteAllowlistRule(ctx context.Context, clusterID, ruleID int64) error
- func (c *Client) DeleteCluster(ctx context.Context, clusterID int64, clusterName string) (*model.ClusterRequest, error)
- func (c *Client) DeleteClusterVPCPeering(ctx context.Context, clusterID, peerID int64) error
- func (c *Client) GetCluster(ctx context.Context, clusterID int64) (*model.Cluster, error)
- func (c *Client) GetClusterRequest(ctx context.Context, requestID int64) (model.ClusterRequest, error)
- func (c *Client) GetClusterVPCPeering(ctx context.Context, clusterID, peerID int64) (*model.VPCPeering, error)
- func (c *Client) ListAllowlistRules(ctx context.Context, clusterID int64) ([]model.AllowedIP, error)
- func (c *Client) ListCloudProviderInstances(ctx context.Context, providerID int64) ([]model.CloudProviderInstance, error)
- func (c *Client) ListCloudProviderRegions(ctx context.Context, providerID int64) (*model.CloudProviderRegions, error)
- func (c *Client) ListCloudProviders(ctx context.Context) ([]model.CloudProvider, error)
- func (c *Client) ListClusterNodes(ctx context.Context, clusterID int64) ([]model.Node, error)
- func (c *Client) ListClusterRequest(ctx context.Context, clusterID int64, typ string) ([]model.ClusterRequest, error)
- func (c *Client) ListClusterVPCPeerings(ctx context.Context, clusterID int64) ([]model.VPCPeering, error)
- func (c *Client) ListClusters(ctx context.Context) ([]model.Cluster, error)
- func (c *Client) ListDataCenters(ctx context.Context, clusterID int64) ([]model.Datacenter, error)
- func (c *Client) ListScyllaVersions(ctx context.Context) (*model.ScyllaVersions, error)
- type CloudProvider
- func (p *CloudProvider) InstanceByID(id int64) *model.CloudProviderInstance
- func (p *CloudProvider) InstanceByName(name string) *model.CloudProviderInstance
- func (p *CloudProvider) InstanceByNameAndDiskSize(name string, diskSize int) *model.CloudProviderInstance
- func (p *CloudProvider) RegionByID(id int64) *model.CloudProviderRegion
- func (p *CloudProvider) RegionByName(name string) *model.CloudProviderRegion
- type Cloudmeta
- func (m *Cloudmeta) DefaultVersion() *model.ScyllaVersion
- func (m *Cloudmeta) ProviderByID(id int64) *CloudProvider
- func (m *Cloudmeta) ProviderByName(name string) *CloudProvider
- func (m *Cloudmeta) VersionByID(id int64) *model.ScyllaVersion
- func (m *Cloudmeta) VersionByName(name string) *model.ScyllaVersion
- type RetryStrategy
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultClassifier retrier.Classifier = &RetryStrategy{ RetryStatus: []int{ http.StatusBadGateway, http.StatusServiceUnavailable, http.StatusGatewayTimeout, http.StatusTooManyRequests, http.StatusRequestTimeout, http.StatusTooEarly, http.StatusLocked, }, RetryCode: []string{ "000001", }, RetryMessage: []string{ "connection reset", "use of closed network connection", "broken pipe", "transport connection broken", "connection refused", }, FailMessage: []string{ "certificate is not trusted", "unsupported protocol scheme", "net/http: request canceled", "net/http: request canceled while waiting for connection", }, }
Functions ¶
func IsDeletedErr ¶ added in v1.3.0
Types ¶
type Client ¶
type Client struct { Meta *Cloudmeta // Headers holds headers that will be set for all http requests. Headers http.Header // API endpoint Endpoint *url.URL // ErrCodes provides a human-readable translation of ScyllaDB API errors. ErrCodes map[string]string // code -> message // HTTPClient is the underlying HTTP client used to run the requests. // It may be overloaded but a default one is provided in “NewClient“ by default. HTTPClient *http.Client // AccountID holds the account ID used in requests to the API. AccountID int64 Retry *retrier.Retrier // Retrier is used to retry requests to the API. }
Client represents a client to call the Scylla Cloud API
func (*Client) CreateAllowlistRule ¶
func (*Client) CreateCluster ¶
func (c *Client) CreateCluster(ctx context.Context, req *model.ClusterCreateRequest) (*model.ClusterRequest, error)
func (*Client) CreateClusterVPCPeering ¶
func (c *Client) CreateClusterVPCPeering(ctx context.Context, clusterID int64, req *model.VPCPeeringRequest) (*model.VPCPeering, error)
func (*Client) DeleteAllowlistRule ¶
func (*Client) DeleteCluster ¶
func (*Client) DeleteClusterVPCPeering ¶
func (*Client) GetCluster ¶
func (*Client) GetClusterRequest ¶
func (*Client) GetClusterVPCPeering ¶
func (*Client) ListAllowlistRules ¶
func (*Client) ListCloudProviderInstances ¶
func (*Client) ListCloudProviderRegions ¶
func (*Client) ListCloudProviders ¶
func (*Client) ListClusterNodes ¶
func (*Client) ListClusterRequest ¶
func (*Client) ListClusterVPCPeerings ¶
func (*Client) ListClusters ¶
func (*Client) ListDataCenters ¶
func (*Client) ListScyllaVersions ¶
type CloudProvider ¶
type CloudProvider struct { CloudProvider *model.CloudProvider CloudProviderRegions *model.CloudProviderRegions }
func (*CloudProvider) InstanceByID ¶
func (p *CloudProvider) InstanceByID(id int64) *model.CloudProviderInstance
func (*CloudProvider) InstanceByName ¶
func (p *CloudProvider) InstanceByName(name string) *model.CloudProviderInstance
func (*CloudProvider) InstanceByNameAndDiskSize ¶ added in v1.6.0
func (p *CloudProvider) InstanceByNameAndDiskSize(name string, diskSize int) *model.CloudProviderInstance
func (*CloudProvider) RegionByID ¶
func (p *CloudProvider) RegionByID(id int64) *model.CloudProviderRegion
func (*CloudProvider) RegionByName ¶
func (p *CloudProvider) RegionByName(name string) *model.CloudProviderRegion
type Cloudmeta ¶
type Cloudmeta struct { CloudProviders []CloudProvider ScyllaVersions *model.ScyllaVersions GCPBlocks map[string]string // region -> cidr block }
func (*Cloudmeta) DefaultVersion ¶
func (m *Cloudmeta) DefaultVersion() *model.ScyllaVersion
func (*Cloudmeta) ProviderByID ¶
func (m *Cloudmeta) ProviderByID(id int64) *CloudProvider
func (*Cloudmeta) ProviderByName ¶
func (m *Cloudmeta) ProviderByName(name string) *CloudProvider
func (*Cloudmeta) VersionByID ¶
func (m *Cloudmeta) VersionByID(id int64) *model.ScyllaVersion
func (*Cloudmeta) VersionByName ¶
func (m *Cloudmeta) VersionByName(name string) *model.ScyllaVersion
Source Files ¶
Click to show internal directories.
Click to hide internal directories.