hazelcastcloud

package module
v1.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2022 License: Apache-2.0 Imports: 15 Imported by: 1

README ΒΆ

Hazelcast Cloud SDK - Go

GoDoc Test Coverage

Hazelcast Cloud is a client library to consume Public API easily.

You can view Hazelcast Cloud API references from here: https://docs.cloud.hazelcast.com/docs/api-reference

Install

go get github.com/hazelcast/hazelcast-cloud-sdk-go@vX.Y.Z

where X.Y.Z is the version you need.

or

go get github.com/hazelcast/hazelcast-cloud-sdk-go

for non Go modules usage or latest version.

Usage

import "github.com/hazelcast/hazelcast-cloud-sdk-go"

Create a new HazelcastCloud client, then use the exposed services to access different parts of the Hazelcast Cloud Public API.

Authentication

Currently, using API Keys and API Secrets is the only method of authenticating with the API. You can manage your tokens in Hazelcast Cloud Developer Page.

Then, you can use your API Key and API Secret to create a new client as shown below:

package main

import (
    "github.com/hazelcast/hazelcast-cloud-sdk-go"
)

func main() {
    client := hazelcastcloud.NewFromCredentials("API-KEY", "API-SECRET")
}

Also, you can use hazelcastcloud.New() to provider your API Key and API Secret from environment variables as HZ_CLOUD_API_KEY and HZ_CLOUD_API_SECRET

πŸš€ Examples

  • Create a new Starter Cluster:
clusterName := "my-awesome-cluster"
createInput := models.CreateStarterClusterInput{
  Name:             clusterName,
  CloudProvider:    "aws",
  Region:           "us-west-2",
  ClusterType:      "FREE",
  HazelcastVersion: "4.0",
  TotalMemory:      0.2,
}

newCluster, _, createErr := client.StarterCluster.Create(context.Background(), &createInput)
if createErr != nil {
  fmt.Printf("An error occurred: %s\n\n", createErr)
  return
}

🏷️ Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

⭐️ Documentation

For details on all the functionality in this library, see the GoDoc documentation. Also, you can refer API References for Graphql queries and mutations to understand payloads.

🀝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

πŸ“ License

Copyright Β© 2020 Hazelcast.
This project is Apache License 2.0 licensed.

logo

Documentation ΒΆ

Overview ΒΆ

Package hazelcastcloud is the Hazelcast Cloud API client for Go.

Index ΒΆ

Examples ΒΆ

Constants ΒΆ

This section is empty.

Variables ΒΆ

This section is empty.

Functions ΒΆ

func AugmentResponse ΒΆ

func AugmentResponse(response *http.Response) ([]byte, error)

This function augments the response and returns and error if response has

func DoRequestWithClient ΒΆ

func DoRequestWithClient(
	ctx context.Context,
	client *http.Client,
	req *http.Request) (*http.Response, error)

This function does request with the request and client provided.

func New ΒΆ

func New(options ...Option) (*Client, *Response, error)

This function creates a new client.

func NewFromCredentials ΒΆ

func NewFromCredentials(apiKey string, apiSecret string, options ...Option) (*Client, *Response, error)

This function create new client with ApiKey and ApiSecret.

func OptionEndpoint ΒΆ

func OptionEndpoint(e string) func(*Client)

Types ΒΆ

type AuthService ΒΆ

type AuthService interface {
	Login(ctx context.Context, input *models.LoginInput) (*models.Login, *Response, error)
}

This AuthService is used to make authorization operations

func NewAuthService ΒΆ

func NewAuthService(client *Client) AuthService

type AwsPeeringService ΒΆ added in v1.1.0

func NewAwsPeeringService ΒΆ added in v1.1.0

func NewAwsPeeringService(client *Client) AwsPeeringService

type AzurePeeringService ΒΆ added in v1.1.0

func NewAzurePeeringService ΒΆ added in v1.1.0

func NewAzurePeeringService(client *Client) AzurePeeringService

type Client ΒΆ

type Client struct {
	BaseURL   *url.URL
	UserAgent string
	Rate      Rate

	Token string

	ServerlessCluster ServerlessClusterService
	StarterCluster    StarterClusterService
	EnterpriseCluster EnterpriseClusterService
	CloudProvider     CloudProviderService
	Region            RegionService
	InstanceType      InstanceTypeService
	HazelcastVersion  HazelcastVersionService
	Auth              AuthService
	GcpPeering        GcpPeeringService
	AzurePeering      AzurePeeringService
	AwsPeering        AwsPeeringService
	// contains filtered or unexported fields
}

This is the main Client.

func NewClient ΒΆ

func NewClient(httpClient *http.Client, options ...Option) *Client

This creates a new client with provided http client.

func (*Client) Do ΒΆ

func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Response, error)

This function sends http request to the server. Then it creates a response according to type interface provided as v. It returns error if response is not successful.

func (*Client) NewRequest ΒΆ

func (c *Client) NewRequest(body *models.GraphqlRequest) (*http.Request, error)

This function creates a new http request from graphql request. It returns an error if it can not build request.

func (*Client) NewUploadFileRequest ΒΆ added in v1.3.1

func (c *Client) NewUploadFileRequest(request *models.GraphqlRequest) (*http.Request, error)

func (*Client) OnRequestCompleted ΒΆ

func (c *Client) OnRequestCompleted(rc RequestCompletionCallback)

This is the OnRequestCompleted method to assign callback.

type CloudProviderService ΒΆ

type CloudProviderService interface {
	List(ctx context.Context) (*[]models.CloudProvider, *Response, error)
}

This CloudProviderService is used to make operations related with cloud providers

Example (List) ΒΆ
client, _, _ := New()
cloudProviders, _, _ := client.CloudProvider.List(context.Background())
fmt.Printf("Result: %#v", cloudProviders)
Output:

Result: &[]models.CloudProvider{models.CloudProvider{Name:"aws", IsEnabledForStarter:true, IsEnabledForEnterprise:true}, models.CloudProvider{Name:"azure", IsEnabledForStarter:false, IsEnabledForEnterprise:true}, models.CloudProvider{Name:"google", IsEnabledForStarter:false, IsEnabledForEnterprise:false}}

func NewCloudProviderService ΒΆ

func NewCloudProviderService(client *Client) CloudProviderService

type EnterpriseClusterService ΒΆ

This EnterpriseClusterService is used to make operations related with enterprise clusters

Example (Create) ΒΆ
client, _, _ := New()
cluster, _, _ := client.EnterpriseCluster.Create(context.Background(), &models.CreateEnterpriseClusterInput{
	Name:                  "enterprise-cluster",
	CloudProvider:         "aws",
	Region:                "us-east-2",
	ZoneType:              models.ZoneTypeSingle,
	InstanceType:          "m5.large",
	InstancePerZone:       1,
	HazelcastVersion:      "3.12.6",
	IsPublicAccessEnabled: true,
	CidrBlock:             "10.18.0.0/16",
	NativeMemory:          3,
	IsAutoScalingEnabled:  false,
	IsHotRestartEnabled:   false,
	IsHotBackupEnabled:    false,
	IsTLSEnabled:          false,
	DataStructure:         models.DataStructureInput{},
})
fmt.Printf("Result: #%v ", cluster)
Output:

Result: &models.Cluster{Id:"53807", CustomerId:10090, Name:"enterprise-cluster", Password:"e75140b884db4e488ecfb77fca92988c", Port:34023, HazelcastVersion:"3.12.6", IsAutoScalingEnabled:false, IsHotBackupEnabled:false, IsHotRestartEnabled:false, IsIpWhitelistEnabled:false, IsTlsEnabled:false, ProductType:struct { Name models.ProductTypeName "json:\"name\""; IsFree bool "json:\"isFree\"" }{Name:"Enterprise", IsFree:false}, State:"PENDING", CreatedAt:"2020-09-08T07:39:38.000Z", StartedAt:"2020-09-08T07:39:38.000Z", StoppedAt:"", Progress:struct { Status string "json:\"status\""; TotalItemCount int "json:\"totalItemCount\""; CompletedItemCount int "json:\"completedItemCount\"" }{Status:"Preparing", TotalItemCount:4, CompletedItemCount:0}, CloudProvider:struct { Name string "json:\"name\""; Region string "json:\"region\""; AvailabilityZones []string "json:\"availabilityZones\"" }{Name:"aws", Region:"us-east-2", AvailabilityZones:[]string{"us-east-2c", "us-east-2a", "us-east-2b"}}, DiscoveryTokens:[]models.DiscoveryToken{models.DiscoveryToken{Source:"public", Token:"RA6aaSPU9B0PouzK9VRYAISRYBFPCmqVl9E5lU737pyCat0NWQ"}}, Specs:struct { TotalMemory float64 "json:\"totalMemory\""; HeapMemory int "json:\"heapMemory\""; NativeMemory int "json:\"nativeMemory\""; Cpu int "json:\"cpu\""; InstanceType string "json:\"instanceType\""; InstancePerZone int "json:\"instancePerZone\"" }{TotalMemory:21, HeapMemory:4, NativeMemory:3, Cpu:1500, InstanceType:"m5.large", InstancePerZone:1}, Networking:struct { Type string "json:\"type\""; CidrBlock string "json:\"cidrBlock\""; Peering struct { IsEnabled bool "json:\"is_enabled\"" } "json:\"peering\""; PrivateLink struct { Url string "json:\"url\""; State string "json:\"state\"" } "json:\"privateLink\"" }{Type:"PUBLIC", CidrBlock:"10.18.0.0/16", Peering:struct { IsEnabled bool "json:\"is_enabled\"" }{IsEnabled:false}, PrivateLink:struct { Url string "json:\"url\""; State string "json:\"state\"" }{Url:"", State:"NOT_ACTIVE"}}, DataStructures:models.DataStructureResponse{MapConfigs:[]models.MapConfigResponse{}, JCacheConfigs:[]models.JCacheConfigResponse{}, ReplicatedMapConfigs:[]models.ReplicatedMapConfigResponse{}, QueueConfigs:[]models.QueueConfigResponse{}, SetConfigs:[]models.SetConfigResponse{}, ListConfigs:[]models.ListConfigResponse{}, TopicConfigs:[]models.TopicConfigResponse{}, MultiMapConfigs:[]models.MultiMapConfigResponse{}, RingBufferConfigs:[]models.RingBufferConfigResponse{}, ReliableTopicConfigs:[]models.ReliableTopicConfigResponse{}}}
Example (Delete) ΒΆ
client, _, _ := New()
cluster, _, _ := client.EnterpriseCluster.Delete(context.Background(), &models.ClusterDeleteInput{ClusterId: "53807"})
fmt.Printf("Result: #%v ", cluster)
Output:

Result: &models.ClusterId{ClusterId:53805}}
Example (Get) ΒΆ
client, _, _ := New()
cluster, _, _ := client.EnterpriseCluster.Get(context.Background(), &models.GetEnterpriseClusterInput{ClusterId: "53807"})
fmt.Printf("Result: #%v ", cluster)
Output:

Result: &models.Cluster{Id:"53807", CustomerId:10090, Name:"enterprise-cluster", Password:"e75140b884db4e488ecfb77fca92988c", Port:34023, HazelcastVersion:"3.12.6", IsAutoScalingEnabled:false, IsHotBackupEnabled:false, IsHotRestartEnabled:false, IsIpWhitelistEnabled:false, IsTlsEnabled:false, ProductType:struct { Name models.ProductTypeName "json:\"name\""; IsFree bool "json:\"isFree\"" }{Name:"Enterprise", IsFree:false}, State:"RUNNING", CreatedAt:"2020-09-08T07:39:38.000Z", StartedAt:"2020-09-08T07:50:59.000Z", StoppedAt:"", Progress:struct { Status string "json:\"status\""; TotalItemCount int "json:\"totalItemCount\""; CompletedItemCount int "json:\"completedItemCount\"" }{Status:"Installing Hazelcast", TotalItemCount:0, CompletedItemCount:4}, CloudProvider:struct { Name string "json:\"name\""; Region string "json:\"region\""; AvailabilityZones []string "json:\"availabilityZones\"" }{Name:"aws", Region:"us-east-2", AvailabilityZones:[]string{"us-east-2c", "us-east-2a", "us-east-2b"}}, DiscoveryTokens:[]models.DiscoveryToken{models.DiscoveryToken{Source:"public", Token:"RA6aaSPU9B0PouzK9VRYAISRYBFPCmqVl9E5lU737pyCat0NWQ"}}, Specs:struct { TotalMemory float64 "json:\"totalMemory\""; HeapMemory int "json:\"heapMemory\""; NativeMemory int "json:\"nativeMemory\""; Cpu int "json:\"cpu\""; InstanceType string "json:\"instanceType\""; InstancePerZone int "json:\"instancePerZone\"" }{TotalMemory:21, HeapMemory:4, NativeMemory:3, Cpu:1500, InstanceType:"m5.large", InstancePerZone:1}, Networking:struct { Type string "json:\"type\""; CidrBlock string "json:\"cidrBlock\""; Peering struct { IsEnabled bool "json:\"is_enabled\"" } "json:\"peering\""; PrivateLink struct { Url string "json:\"url\""; State string "json:\"state\"" } "json:\"privateLink\"" }{Type:"PUBLIC", CidrBlock:"10.18.0.0/16", Peering:struct { IsEnabled bool "json:\"is_enabled\"" }{IsEnabled:false}, PrivateLink:struct { Url string "json:\"url\""; State string "json:\"state\"" }{Url:"", State:"NOT_ACTIVE"}}, DataStructures:models.DataStructureResponse{MapConfigs:[]models.MapConfigResponse{}, JCacheConfigs:[]models.JCacheConfigResponse{}, ReplicatedMapConfigs:[]models.ReplicatedMapConfigResponse{}, QueueConfigs:[]models.QueueConfigResponse{}, SetConfigs:[]models.SetConfigResponse{}, ListConfigs:[]models.ListConfigResponse{}, TopicConfigs:[]models.TopicConfigResponse{}, MultiMapConfigs:[]models.MultiMapConfigResponse{}, RingBufferConfigs:[]models.RingBufferConfigResponse{}, ReliableTopicConfigs:[]models.ReliableTopicConfigResponse{}}}
Example (List) ΒΆ
client, _, _ := New()
clusters, _, _ := client.EnterpriseCluster.List(context.Background())
fmt.Printf("Result: #%v ", clusters)
Output:

Result: &[]models.Cluster{models.Cluster{Id:"53807", CustomerId:10090, Name:"enterprise-cluster", Password:"", Port:34023, HazelcastVersion:"3.12.6", IsAutoScalingEnabled:false, IsHotBackupEnabled:false, IsHotRestartEnabled:false, IsIpWhitelistEnabled:false, IsTlsEnabled:false, ProductType:struct { Name models.ProductTypeName "json:\"name\""; IsFree bool "json:\"isFree\"" }{Name:"Enterprise", IsFree:false}, State:"PENDING", CreatedAt:"2020-09-08T07:39:38.000Z", StartedAt:"2020-09-08T07:39:38.000Z", StoppedAt:"", Progress:struct { Status string "json:\"status\""; TotalItemCount int "json:\"totalItemCount\""; CompletedItemCount int "json:\"completedItemCount\"" }{Status:"Validating Environment", TotalItemCount:4, CompletedItemCount:2}, CloudProvider:struct { Name string "json:\"name\""; Region string "json:\"region\""; AvailabilityZones []string "json:\"availabilityZones\"" }{Name:"aws", Region:"us-east-2", AvailabilityZones:[]string(nil)}, DiscoveryTokens:[]models.DiscoveryToken{}, Specs:struct { TotalMemory float64 "json:\"totalMemory\""; HeapMemory int "json:\"heapMemory\""; NativeMemory int "json:\"nativeMemory\""; Cpu int "json:\"cpu\""; InstanceType string "json:\"instanceType\""; InstancePerZone int "json:\"instancePerZone\"" }{TotalMemory:21, HeapMemory:4, NativeMemory:3, Cpu:1500, InstanceType:"m5.large", InstancePerZone:1}, Networking:struct { Type string "json:\"type\""; CidrBlock string "json:\"cidrBlock\""; Peering struct { IsEnabled bool "json:\"is_enabled\"" } "json:\"peering\""; PrivateLink struct { Url string "json:\"url\""; State string "json:\"state\"" } "json:\"privateLink\"" }{Type:"PUBLIC", CidrBlock:"10.18.0.0/16", Peering:struct { IsEnabled bool "json:\"is_enabled\"" }{IsEnabled:false}, PrivateLink:struct { Url string "json:\"url\""; State string "json:\"state\"" }{Url:"", State:"NOT_ACTIVE"}}, DataStructures:models.DataStructureResponse{MapConfigs:[]models.MapConfigResponse{}, JCacheConfigs:[]models.JCacheConfigResponse{}, ReplicatedMapConfigs:[]models.ReplicatedMapConfigResponse{}, QueueConfigs:[]models.QueueConfigResponse{}, SetConfigs:[]models.SetConfigResponse{}, ListConfigs:[]models.ListConfigResponse{}, TopicConfigs:[]models.TopicConfigResponse{}, MultiMapConfigs:[]models.MultiMapConfigResponse{}, RingBufferConfigs:[]models.RingBufferConfigResponse(nil), ReliableTopicConfigs:[]models.ReliableTopicConfigResponse{}}}}

func NewEnterpriseClusterService ΒΆ

func NewEnterpriseClusterService(client *Client) EnterpriseClusterService

type ErrorResponse ΒΆ

type ErrorResponse struct {
	CorrelationId string `json:"correlation_id,omitempty"`
	Message       string `json:"message"`
	Response      *http.Response
}

Error response is the main type of response for the errors this library handles

func (*ErrorResponse) Error ΒΆ

func (r *ErrorResponse) Error() string

This method returns an Error string of ErrorResponse.

type GcpPeeringService ΒΆ added in v1.1.0

func NewGcpPeeringService ΒΆ added in v1.1.0

func NewGcpPeeringService(client *Client) GcpPeeringService

type GraphQLQuery ΒΆ

type GraphQLQuery struct {
	OperationName string                 `json:"operationName,omitempty"`
	Query         string                 `json:"query"`
	Variables     map[string]interface{} `json:"variables"`
}

Type of graphql query

type HazelcastVersionService ΒΆ

type HazelcastVersionService interface {
	List(ctx context.Context) (*[]models.EnterpriseHazelcastVersion, *Response, error)
}

This HazelcastVersionService is used to make operations related with enterprise clusters

Example (List) ΒΆ
client, _, _ := New()
hazelcastVersions, _, _ := client.HazelcastVersion.List(context.Background())
fmt.Printf("Result: %#v", hazelcastVersions)
Output:

Result: &[]models.EnterpriseHazelcastVersion{models.EnterpriseHazelcastVersion{Version:"4.0", UpgradeableVersions:[]string{}}, models.EnterpriseHazelcastVersion{Version:"3.12.6", UpgradeableVersions:[]string{}}, models.EnterpriseHazelcastVersion{Version:"3.12.5", UpgradeableVersions:[]string{"3.12.6"}}, models.EnterpriseHazelcastVersion{Version:"3.12.4", UpgradeableVersions:[]string{"3.12.6", "3.12.5"}}, models.EnterpriseHazelcastVersion{Version:"3.12.3", UpgradeableVersions:[]string{"3.12.6", "3.12.5", "3.12.4"}}, models.EnterpriseHazelcastVersion{Version:"3.12.2", UpgradeableVersions:[]string{"3.12.6", "3.12.5", "3.12.4", "3.12.3"}}, models.EnterpriseHazelcastVersion{Version:"3.12.1", UpgradeableVersions:[]string{"3.12.6", "3.12.5", "3.12.4", "3.12.3", "3.12.2"}}, models.EnterpriseHazelcastVersion{Version:"3.12", UpgradeableVersions:[]string{"3.12.6", "3.12.5", "3.12.4", "3.12.3", "3.12.2", "3.12.1"}}}

func NewHazelcastVersionService ΒΆ

func NewHazelcastVersionService(client *Client) HazelcastVersionService

type InstanceTypeService ΒΆ

type InstanceTypeService interface {
	List(ctx context.Context, input *models.InstanceTypeInput) (*[]models.InstanceType, *Response, error)
}

This InstanceTypeService is used to make operations related with instance types

Example (List) ΒΆ
client, _, _ := New()
instanceTypes, _, _ := client.InstanceType.List(context.Background(), &models.InstanceTypeInput{CloudProvider: "aws"})
fmt.Printf("Result: %#v", instanceTypes)
Output:

Result: &[]models.InstanceType{models.InstanceType{Name:"r5.4xlarge", TotalMemory:127}, models.InstanceType{Name:"r5.2xlarge", TotalMemory:63}, models.InstanceType{Name:"r5a.2xlarge", TotalMemory:63}, models.InstanceType{Name:"m5.large", TotalMemory:7}, models.InstanceType{Name:"m5.xlarge", TotalMemory:15}, models.InstanceType{Name:"r5a.xlarge", TotalMemory:31}, models.InstanceType{Name:"m5.4xlarge", TotalMemory:63}, models.InstanceType{Name:"r5.xlarge", TotalMemory:31}, models.InstanceType{Name:"r5a.4xlarge", TotalMemory:127}, models.InstanceType{Name:"r5.large", TotalMemory:15}, models.InstanceType{Name:"m5.2xlarge", TotalMemory:31}}

func NewInstanceTypeService ΒΆ

func NewInstanceTypeService(client *Client) InstanceTypeService

type Option ΒΆ

type Option func(*Client)

type Rate ΒΆ

type Rate struct {
	Limit     int   `json:"limit"`
	Remaining int   `json:"remaining"`
	Reset     int64 `json:"reset"`
}

Type of the rate limiting params we follow

type RegionService ΒΆ

type RegionService interface {
	List(ctx context.Context, input *models.RegionInput) (*[]models.Region, *Response, error)
}

This RegionService is used to make operations related with regions

Example (List) ΒΆ
client, _, _ := New()
regions, _, _ := client.Region.List(context.Background(), &models.RegionInput{CloudProvider: "aws"})
fmt.Printf("Result: %#v", regions)
Output:

Result: &[]models.Region{models.Region{Name:"us-east-1", IsEnabledForStarter:false, IsEnabledForEnterprise:true}, models.Region{Name:"us-east-2", IsEnabledForStarter:false, IsEnabledForEnterprise:true}, models.Region{Name:"us-west-1", IsEnabledForStarter:false, IsEnabledForEnterprise:true}, models.Region{Name:"us-west-2", IsEnabledForStarter:true, IsEnabledForEnterprise:true}, models.Region{Name:"ap-south-1", IsEnabledForStarter:false, IsEnabledForEnterprise:true}, models.Region{Name:"ap-northeast-2", IsEnabledForStarter:false, IsEnabledForEnterprise:true}, models.Region{Name:"ap-southeast-1", IsEnabledForStarter:false, IsEnabledForEnterprise:true}, models.Region{Name:"ap-southeast-2", IsEnabledForStarter:false, IsEnabledForEnterprise:true}, models.Region{Name:"ap-northeast-1", IsEnabledForStarter:false, IsEnabledForEnterprise:true}, models.Region{Name:"ca-central-1", IsEnabledForStarter:false, IsEnabledForEnterprise:true}, models.Region{Name:"eu-central-1", IsEnabledForStarter:false, IsEnabledForEnterprise:true}, models.Region{Name:"eu-west-1", IsEnabledForStarter:false, IsEnabledForEnterprise:true}, models.Region{Name:"eu-west-2", IsEnabledForStarter:false, IsEnabledForEnterprise:true}, models.Region{Name:"eu-west-3", IsEnabledForStarter:false, IsEnabledForEnterprise:true}, models.Region{Name:"sa-east-1", IsEnabledForStarter:false, IsEnabledForEnterprise:true}}

func NewRegionService ΒΆ

func NewRegionService(client *Client) RegionService

type RequestCompletionCallback ΒΆ

type RequestCompletionCallback func(*http.Request, *http.Response)

This is the RequestCompletionCallback to intercept response when request complete.

type Response ΒΆ

type Response struct {
	*http.Response
	Rate
}

Type of the main response

type ServerlessClusterService ΒΆ added in v1.3.0

type ServerlessClusterService struct {
	// contains filtered or unexported fields
}

ServerlessClusterService is used to interact with serverless clusters.

Example (Create) ΒΆ
server := exampleTestMockServer()
defer server.Close()
client, _, _ := NewFromCredentials("apiKey", "apiSecret", OptionEndpoint(server.URL))
cluster, _, _ := client.ServerlessCluster.Create(context.Background(), &createServerlessClusterRequest)
fmt.Printf("Result: %#v", cluster)
Output:

Result: &models.Cluster{Id:"1", CustomerId:10, Name:"test-cluster", ReleaseName:"pr-1", Password:"hidden", Port:30000, HazelcastVersion:"5.1.1", IsAutoScalingEnabled:true, IsHotBackupEnabled:true, IsHotRestartEnabled:true, IsIpWhitelistEnabled:false, IsTlsEnabled:true, ProductType:struct { Name models.ProductTypeName "json:\"name\""; IsFree bool "json:\"isFree\"" }{Name:"STARTER", IsFree:false}, ClusterType:struct { Name models.ClusterType "json:\"name\"" }{Name:"SERVERLESS"}, State:"PENDING", CreatedAt:"2022-04-21T11:49:02.000Z", StartedAt:"2022-04-21T11:49:02.000Z", StoppedAt:"", Progress:struct { Status string "json:\"status\""; TotalItemCount int "json:\"totalItemCount\""; CompletedItemCount int "json:\"completedItemCount\"" }{Status:"Preparing", TotalItemCount:4, CompletedItemCount:0}, CloudProvider:struct { Name string "json:\"name\""; Region string "json:\"region\""; AvailabilityZones []string "json:\"availabilityZones\"" }{Name:"aws", Region:"us-west-2", AvailabilityZones:[]string{"us-west-2a"}}, DiscoveryTokens:[]models.DiscoveryToken{models.DiscoveryToken{Source:"default", Token:"hidden"}}, Specs:struct { TotalMemory float64 "json:\"totalMemory\""; HeapMemory int "json:\"heapMemory\""; NativeMemory int "json:\"nativeMemory\""; Cpu int "json:\"cpu\""; InstanceType string "json:\"instanceType\""; InstancePerZone int "json:\"instancePerZone\"" }{TotalMemory:10, HeapMemory:0, NativeMemory:0, Cpu:0, InstanceType:"", InstancePerZone:0}, Networking:struct { Type string "json:\"type\""; CidrBlock string "json:\"cidrBlock\""; Peering struct { IsEnabled bool "json:\"is_enabled\"" } "json:\"peering\""; PrivateLink struct { Url string "json:\"url\""; State string "json:\"state\"" } "json:\"privateLink\"" }{Type:"", CidrBlock:"", Peering:struct { IsEnabled bool "json:\"is_enabled\"" }{IsEnabled:false}, PrivateLink:struct { Url string "json:\"url\""; State string "json:\"state\"" }{Url:"", State:""}}, DataStructures:models.DataStructureResponse{MapConfigs:[]models.MapConfigResponse{}, JCacheConfigs:[]models.JCacheConfigResponse{}, ReplicatedMapConfigs:[]models.ReplicatedMapConfigResponse{}, QueueConfigs:[]models.QueueConfigResponse{}, SetConfigs:[]models.SetConfigResponse{}, ListConfigs:[]models.ListConfigResponse{}, TopicConfigs:[]models.TopicConfigResponse{}, MultiMapConfigs:[]models.MultiMapConfigResponse{}, RingBufferConfigs:[]models.RingBufferConfigResponse{}, ReliableTopicConfigs:[]models.ReliableTopicConfigResponse{}}}
Example (Delete) ΒΆ
server := exampleTestMockServer()
defer server.Close()
client, _, _ := NewFromCredentials("apiKey", "apiSecret", OptionEndpoint(server.URL))
cluster, _, _ := client.ServerlessCluster.Delete(context.Background(), &models.ClusterDeleteInput{ClusterId: testClusterId})
fmt.Printf("Result: %#v", cluster)
Output:

Result: &models.ClusterId{ClusterId:1}
Example (Get) ΒΆ
server := exampleTestMockServer()
defer server.Close()
client, _, _ := NewFromCredentials("apiKey", "apiSecret", OptionEndpoint(server.URL))
cluster, _, _ := client.ServerlessCluster.Get(context.Background(), &models.GetServerlessClusterInput{ClusterId: testClusterId})
fmt.Printf("Result: %#v", cluster)
Output:

Result: &models.Cluster{Id:"1", CustomerId:10, Name:"test-cluster", ReleaseName:"pr-1", Password:"hidden", Port:30000, HazelcastVersion:"5.1.1", IsAutoScalingEnabled:true, IsHotBackupEnabled:true, IsHotRestartEnabled:true, IsIpWhitelistEnabled:false, IsTlsEnabled:true, ProductType:struct { Name models.ProductTypeName "json:\"name\""; IsFree bool "json:\"isFree\"" }{Name:"STARTER", IsFree:false}, ClusterType:struct { Name models.ClusterType "json:\"name\"" }{Name:"SERVERLESS"}, State:"RUNNING", CreatedAt:"2022-04-21T11:49:02.000Z", StartedAt:"2022-04-21T11:49:02.000Z", StoppedAt:"", Progress:struct { Status string "json:\"status\""; TotalItemCount int "json:\"totalItemCount\""; CompletedItemCount int "json:\"completedItemCount\"" }{Status:"Running", TotalItemCount:4, CompletedItemCount:4}, CloudProvider:struct { Name string "json:\"name\""; Region string "json:\"region\""; AvailabilityZones []string "json:\"availabilityZones\"" }{Name:"aws", Region:"us-west-2", AvailabilityZones:[]string{"us-west-2a"}}, DiscoveryTokens:[]models.DiscoveryToken{models.DiscoveryToken{Source:"default", Token:"hidden"}}, Specs:struct { TotalMemory float64 "json:\"totalMemory\""; HeapMemory int "json:\"heapMemory\""; NativeMemory int "json:\"nativeMemory\""; Cpu int "json:\"cpu\""; InstanceType string "json:\"instanceType\""; InstancePerZone int "json:\"instancePerZone\"" }{TotalMemory:10, HeapMemory:0, NativeMemory:0, Cpu:0, InstanceType:"", InstancePerZone:0}, Networking:struct { Type string "json:\"type\""; CidrBlock string "json:\"cidrBlock\""; Peering struct { IsEnabled bool "json:\"is_enabled\"" } "json:\"peering\""; PrivateLink struct { Url string "json:\"url\""; State string "json:\"state\"" } "json:\"privateLink\"" }{Type:"", CidrBlock:"", Peering:struct { IsEnabled bool "json:\"is_enabled\"" }{IsEnabled:false}, PrivateLink:struct { Url string "json:\"url\""; State string "json:\"state\"" }{Url:"", State:""}}, DataStructures:models.DataStructureResponse{MapConfigs:[]models.MapConfigResponse{}, JCacheConfigs:[]models.JCacheConfigResponse{}, ReplicatedMapConfigs:[]models.ReplicatedMapConfigResponse{}, QueueConfigs:[]models.QueueConfigResponse{}, SetConfigs:[]models.SetConfigResponse{}, ListConfigs:[]models.ListConfigResponse{}, TopicConfigs:[]models.TopicConfigResponse{}, MultiMapConfigs:[]models.MultiMapConfigResponse{}, RingBufferConfigs:[]models.RingBufferConfigResponse{}, ReliableTopicConfigs:[]models.ReliableTopicConfigResponse{}}}
Example (List) ΒΆ
server := exampleTestMockServer()
defer server.Close()
client, _, _ := NewFromCredentials("apiKey", "apiSecret", OptionEndpoint(server.URL))
clusters, _, _ := client.ServerlessCluster.List(context.Background())
fmt.Printf("Result: %#v", clusters)
Output:

Result: &[]models.Cluster{models.Cluster{Id:"1", CustomerId:10, Name:"test-cluster1", ReleaseName:"pr-1", Password:"hidden", Port:30000, HazelcastVersion:"5.1.1", IsAutoScalingEnabled:true, IsHotBackupEnabled:true, IsHotRestartEnabled:true, IsIpWhitelistEnabled:false, IsTlsEnabled:true, ProductType:struct { Name models.ProductTypeName "json:\"name\""; IsFree bool "json:\"isFree\"" }{Name:"STARTER", IsFree:false}, ClusterType:struct { Name models.ClusterType "json:\"name\"" }{Name:"SERVERLESS"}, State:"RUNNING", CreatedAt:"2022-04-21T11:49:02.000Z", StartedAt:"2022-04-21T11:49:02.000Z", StoppedAt:"", Progress:struct { Status string "json:\"status\""; TotalItemCount int "json:\"totalItemCount\""; CompletedItemCount int "json:\"completedItemCount\"" }{Status:"Running", TotalItemCount:4, CompletedItemCount:4}, CloudProvider:struct { Name string "json:\"name\""; Region string "json:\"region\""; AvailabilityZones []string "json:\"availabilityZones\"" }{Name:"aws", Region:"us-west-2", AvailabilityZones:[]string{"us-west-2a"}}, DiscoveryTokens:[]models.DiscoveryToken{models.DiscoveryToken{Source:"default", Token:"hidden"}}, Specs:struct { TotalMemory float64 "json:\"totalMemory\""; HeapMemory int "json:\"heapMemory\""; NativeMemory int "json:\"nativeMemory\""; Cpu int "json:\"cpu\""; InstanceType string "json:\"instanceType\""; InstancePerZone int "json:\"instancePerZone\"" }{TotalMemory:10, HeapMemory:0, NativeMemory:0, Cpu:0, InstanceType:"", InstancePerZone:0}, Networking:struct { Type string "json:\"type\""; CidrBlock string "json:\"cidrBlock\""; Peering struct { IsEnabled bool "json:\"is_enabled\"" } "json:\"peering\""; PrivateLink struct { Url string "json:\"url\""; State string "json:\"state\"" } "json:\"privateLink\"" }{Type:"", CidrBlock:"", Peering:struct { IsEnabled bool "json:\"is_enabled\"" }{IsEnabled:false}, PrivateLink:struct { Url string "json:\"url\""; State string "json:\"state\"" }{Url:"", State:""}}, DataStructures:models.DataStructureResponse{MapConfigs:[]models.MapConfigResponse{}, JCacheConfigs:[]models.JCacheConfigResponse{}, ReplicatedMapConfigs:[]models.ReplicatedMapConfigResponse{}, QueueConfigs:[]models.QueueConfigResponse{}, SetConfigs:[]models.SetConfigResponse{}, ListConfigs:[]models.ListConfigResponse{}, TopicConfigs:[]models.TopicConfigResponse{}, MultiMapConfigs:[]models.MultiMapConfigResponse{}, RingBufferConfigs:[]models.RingBufferConfigResponse{}, ReliableTopicConfigs:[]models.ReliableTopicConfigResponse{}}}, models.Cluster{Id:"2", CustomerId:10, Name:"test-cluster2", ReleaseName:"pr-2", Password:"hidden", Port:30000, HazelcastVersion:"5.1.1", IsAutoScalingEnabled:true, IsHotBackupEnabled:true, IsHotRestartEnabled:true, IsIpWhitelistEnabled:false, IsTlsEnabled:true, ProductType:struct { Name models.ProductTypeName "json:\"name\""; IsFree bool "json:\"isFree\"" }{Name:"STARTER", IsFree:false}, ClusterType:struct { Name models.ClusterType "json:\"name\"" }{Name:"SERVERLESS"}, State:"PENDING", CreatedAt:"2022-04-26T13:05:06.000Z", StartedAt:"2022-04-26T13:05:06.000Z", StoppedAt:"", Progress:struct { Status string "json:\"status\""; TotalItemCount int "json:\"totalItemCount\""; CompletedItemCount int "json:\"completedItemCount\"" }{Status:"Preparing", TotalItemCount:4, CompletedItemCount:0}, CloudProvider:struct { Name string "json:\"name\""; Region string "json:\"region\""; AvailabilityZones []string "json:\"availabilityZones\"" }{Name:"aws", Region:"us-west-2", AvailabilityZones:[]string{"us-west-2a"}}, DiscoveryTokens:[]models.DiscoveryToken{models.DiscoveryToken{Source:"default", Token:"hidden"}}, Specs:struct { TotalMemory float64 "json:\"totalMemory\""; HeapMemory int "json:\"heapMemory\""; NativeMemory int "json:\"nativeMemory\""; Cpu int "json:\"cpu\""; InstanceType string "json:\"instanceType\""; InstancePerZone int "json:\"instancePerZone\"" }{TotalMemory:10, HeapMemory:0, NativeMemory:0, Cpu:0, InstanceType:"", InstancePerZone:0}, Networking:struct { Type string "json:\"type\""; CidrBlock string "json:\"cidrBlock\""; Peering struct { IsEnabled bool "json:\"is_enabled\"" } "json:\"peering\""; PrivateLink struct { Url string "json:\"url\""; State string "json:\"state\"" } "json:\"privateLink\"" }{Type:"", CidrBlock:"", Peering:struct { IsEnabled bool "json:\"is_enabled\"" }{IsEnabled:false}, PrivateLink:struct { Url string "json:\"url\""; State string "json:\"state\"" }{Url:"", State:""}}, DataStructures:models.DataStructureResponse{MapConfigs:[]models.MapConfigResponse{}, JCacheConfigs:[]models.JCacheConfigResponse{}, ReplicatedMapConfigs:[]models.ReplicatedMapConfigResponse{}, QueueConfigs:[]models.QueueConfigResponse{}, SetConfigs:[]models.SetConfigResponse{}, ListConfigs:[]models.ListConfigResponse{}, TopicConfigs:[]models.TopicConfigResponse{}, MultiMapConfigs:[]models.MultiMapConfigResponse{}, RingBufferConfigs:[]models.RingBufferConfigResponse{}, ReliableTopicConfigs:[]models.ReliableTopicConfigResponse{}}}}
Example (Resume) ΒΆ
server := exampleTestMockServer()
defer server.Close()
client, _, _ := NewFromCredentials("apiKey", "apiSecret", OptionEndpoint(server.URL))
cluster, _, _ := client.ServerlessCluster.Resume(context.Background(), &models.ClusterResumeInput{ClusterId: testClusterId})
fmt.Printf("Result: %#v", cluster)
Output:

Result: &models.ClusterId{ClusterId:1}
Example (Stop) ΒΆ
server := exampleTestMockServer()
defer server.Close()
client, _, _ := NewFromCredentials("apiKey", "apiSecret", OptionEndpoint(server.URL))
cluster, _, _ := client.ServerlessCluster.Stop(context.Background(), &models.ClusterStopInput{ClusterId: testClusterId})
fmt.Printf("Result: %#v", cluster)
Output:

Result: &models.ClusterId{ClusterId:1}

func NewServerlessClusterService ΒΆ added in v1.3.0

func NewServerlessClusterService(client *Client) ServerlessClusterService

NewServerlessClusterService returns a new instance of the service.

func (ServerlessClusterService) Create ΒΆ added in v1.3.0

Create creates a serverless cluster according to configuration provided in the request.

func (ServerlessClusterService) Delete ΒΆ added in v1.3.0

Delete deletes a serverless cluster by its ID.

func (ServerlessClusterService) DeleteArtifact ΒΆ added in v1.3.1

func (ServerlessClusterService) DownloadArtifact ΒΆ added in v1.3.2

func (ServerlessClusterService) Get ΒΆ added in v1.3.0

Get retrieves a serverless cluster by its ID.

func (ServerlessClusterService) List ΒΆ added in v1.3.0

List provides the ability to get a list of serverless clusters.

func (ServerlessClusterService) ListUploadedArtifacts ΒΆ added in v1.3.1

func (ServerlessClusterService) Resume ΒΆ added in v1.3.0

Resume provides the ability to resume a serverless cluster by its ID.

func (ServerlessClusterService) Stop ΒΆ added in v1.3.0

Stop provides the ability to stop a serverless cluster by its ID.

func (ServerlessClusterService) UploadArtifact ΒΆ added in v1.3.1

type StarterClusterService ΒΆ

This StarterClusterService is used to interact with Starter Clusters.

Example (Create) ΒΆ
client, _, _ := New()
create, _, _ := client.StarterCluster.Create(context.Background(), &models.CreateStarterClusterInput{
	Name:                 "example-cluster",
	CloudProvider:        "aws",
	Region:               "us-west-2",
	ClusterType:          models.Free,
	HazelcastVersion:     "3.12",
	TotalMemory:          0.2,
	IsAutoScalingEnabled: false,
	IsHotBackupEnabled:   false,
	IsHotRestartEnabled:  false,
	IsIPWhitelistEnabled: false,
	IsTLSEnabled:         false,
})
fmt.Printf("Result: %#v", create)
Output:

Result: &models.Cluster{Id:"53805", CustomerId:10090, Name:"example-cluster", Password:"2d2a9e5088a94893a1b27fc060efc2e4", Port:31002, HazelcastVersion:"3.12.9", IsAutoScalingEnabled:false, IsHotBackupEnabled:false, IsHotRestartEnabled:false, IsIpWhitelistEnabled:false, IsTlsEnabled:false, ProductType:struct { Name models.ProductTypeName "json:\"name\""; IsFree bool "json:\"isFree\"" }{Name:"Starter", IsFree:true}, State:"PENDING", CreatedAt:"2020-09-08T07:15:13.000Z", StartedAt:"2020-09-08T07:15:13.000Z", StoppedAt:"", Progress:struct { Status string "json:\"status\""; TotalItemCount int "json:\"totalItemCount\""; CompletedItemCount int "json:\"completedItemCount\"" }{Status:"Preparing", TotalItemCount:4, CompletedItemCount:0}, CloudProvider:struct { Name string "json:\"name\""; Region string "json:\"region\""; AvailabilityZones []string "json:\"availabilityZones\"" }{Name:"aws", Region:"us-west-2", AvailabilityZones:[]string{"us-west-2a"}}, DiscoveryTokens:[]models.DiscoveryToken{models.DiscoveryToken{Source:"default", Token:"fd7Zzw2xbxQ692nHqyPUh7Bq9bSLxm2u8tvflzZQ8eqzD1TmUx"}}, Specs:struct { TotalMemory float64 "json:\"totalMemory\""; HeapMemory int "json:\"heapMemory\""; NativeMemory int "json:\"nativeMemory\""; Cpu int "json:\"cpu\""; InstanceType string "json:\"instanceType\""; InstancePerZone int "json:\"instancePerZone\"" }{TotalMemory:0.2, HeapMemory:0, NativeMemory:0, Cpu:0, InstanceType:"", InstancePerZone:0}, Networking:struct { Type string "json:\"type\""; CidrBlock string "json:\"cidrBlock\""; Peering struct { IsEnabled bool "json:\"is_enabled\"" } "json:\"peering\""; PrivateLink struct { Url string "json:\"url\""; State string "json:\"state\"" } "json:\"privateLink\"" }{Type:"", CidrBlock:"", Peering:struct { IsEnabled bool "json:\"is_enabled\"" }{IsEnabled:false}, PrivateLink:struct { Url string "json:\"url\""; State string "json:\"state\"" }{Url:"", State:""}}, DataStructures:models.DataStructureResponse{MapConfigs:[]models.MapConfigResponse{}, JCacheConfigs:[]models.JCacheConfigResponse{}, ReplicatedMapConfigs:[]models.ReplicatedMapConfigResponse{}, QueueConfigs:[]models.QueueConfigResponse{}, SetConfigs:[]models.SetConfigResponse{}, ListConfigs:[]models.ListConfigResponse{}, TopicConfigs:[]models.TopicConfigResponse{}, MultiMapConfigs:[]models.MultiMapConfigResponse{}, RingBufferConfigs:[]models.RingBufferConfigResponse{}, ReliableTopicConfigs:[]models.ReliableTopicConfigResponse{}}}
Example (Delete) ΒΆ
client, _, _ := New()
cluster, _, _ := client.StarterCluster.Delete(context.Background(), &models.ClusterDeleteInput{ClusterId: "53805"})
fmt.Printf("Result: %#v", cluster)
Output:

Result: &models.ClusterId{ClusterId:53805}
Example (Get) ΒΆ
client, _, _ := New()
cluster, _, _ := client.StarterCluster.Get(context.Background(), &models.GetStarterClusterInput{ClusterId: "53805"})
fmt.Printf("Result: %#v", cluster)
Output:

Result: &models.Cluster{Id:"53805", CustomerId:10090, Name:"example-cluster", Password:"2d2a9e5088a94893a1b27fc060efc2e4", Port:31002, HazelcastVersion:"3.12.9", IsAutoScalingEnabled:false, IsHotBackupEnabled:false, IsHotRestartEnabled:false, IsIpWhitelistEnabled:false, IsTlsEnabled:false, ProductType:struct { Name models.ProductTypeName "json:\"name\""; IsFree bool "json:\"isFree\"" }{Name:"Starter", IsFree:true}, State:"RUNNING", CreatedAt:"2020-09-08T07:15:13.000Z", StartedAt:"2020-09-08T07:16:37.000Z", StoppedAt:"", Progress:struct { Status string "json:\"status\""; TotalItemCount int "json:\"totalItemCount\""; CompletedItemCount int "json:\"completedItemCount\"" }{Status:"Preparing", TotalItemCount:0, CompletedItemCount:0}, CloudProvider:struct { Name string "json:\"name\""; Region string "json:\"region\""; AvailabilityZones []string "json:\"availabilityZones\"" }{Name:"aws", Region:"us-west-2", AvailabilityZones:[]string{"us-west-2a"}}, DiscoveryTokens:[]models.DiscoveryToken{models.DiscoveryToken{Source:"default", Token:"fd7Zzw2xbxQ692nHqyPUh7Bq9bSLxm2u8tvflzZQ8eqzD1TmUx"}}, Specs:struct { TotalMemory float64 "json:\"totalMemory\""; HeapMemory int "json:\"heapMemory\""; NativeMemory int "json:\"nativeMemory\""; Cpu int "json:\"cpu\""; InstanceType string "json:\"instanceType\""; InstancePerZone int "json:\"instancePerZone\"" }{TotalMemory:0.2, HeapMemory:0, NativeMemory:0, Cpu:0, InstanceType:"", InstancePerZone:0}, Networking:struct { Type string "json:\"type\""; CidrBlock string "json:\"cidrBlock\""; Peering struct { IsEnabled bool "json:\"is_enabled\"" } "json:\"peering\""; PrivateLink struct { Url string "json:\"url\""; State string "json:\"state\"" } "json:\"privateLink\"" }{Type:"", CidrBlock:"", Peering:struct { IsEnabled bool "json:\"is_enabled\"" }{IsEnabled:false}, PrivateLink:struct { Url string "json:\"url\""; State string "json:\"state\"" }{Url:"", State:""}}, DataStructures:models.DataStructureResponse{MapConfigs:[]models.MapConfigResponse{}, JCacheConfigs:[]models.JCacheConfigResponse{}, ReplicatedMapConfigs:[]models.ReplicatedMapConfigResponse{}, QueueConfigs:[]models.QueueConfigResponse{}, SetConfigs:[]models.SetConfigResponse{}, ListConfigs:[]models.ListConfigResponse{}, TopicConfigs:[]models.TopicConfigResponse{}, MultiMapConfigs:[]models.MultiMapConfigResponse{}, RingBufferConfigs:[]models.RingBufferConfigResponse{}, ReliableTopicConfigs:[]models.ReliableTopicConfigResponse{}}}
Example (List) ΒΆ
client, _, _ := New()
clusters, _, _ := client.StarterCluster.List(context.Background())
fmt.Printf("Result: %#v", clusters)
Output:

Result: &[]models.Cluster{models.Cluster{Id:"53805", CustomerId:10090, Name:"example-cluster", Password:"", Port:31002, HazelcastVersion:"3.12.9", IsAutoScalingEnabled:false, IsHotBackupEnabled:false, IsHotRestartEnabled:false, IsIpWhitelistEnabled:false, IsTlsEnabled:false, ProductType:struct { Name models.ProductTypeName "json:\"name\""; IsFree bool "json:\"isFree\"" }{Name:"Starter", IsFree:true}, State:"STOPPED", CreatedAt:"2020-09-08T07:25:40.000Z", StartedAt:"2020-09-08T07:26:48.000Z", StoppedAt:"", Progress:struct { Status string "json:\"status\""; TotalItemCount int "json:\"totalItemCount\""; CompletedItemCount int "json:\"completedItemCount\"" }{Status:"Preparing", TotalItemCount:0, CompletedItemCount:0}, CloudProvider:struct { Name string "json:\"name\""; Region string "json:\"region\""; AvailabilityZones []string "json:\"availabilityZones\"" }{Name:"aws", Region:"us-west-2", AvailabilityZones:[]string{"us-west-2a"}}, DiscoveryTokens:[]models.DiscoveryToken{}, Specs:struct { TotalMemory float64 "json:\"totalMemory\""; HeapMemory int "json:\"heapMemory\""; NativeMemory int "json:\"nativeMemory\""; Cpu int "json:\"cpu\""; InstanceType string "json:\"instanceType\""; InstancePerZone int "json:\"instancePerZone\"" }{TotalMemory:0.2, HeapMemory:0, NativeMemory:0, Cpu:0, InstanceType:"", InstancePerZone:0}, Networking:struct { Type string "json:\"type\""; CidrBlock string "json:\"cidrBlock\""; Peering struct { IsEnabled bool "json:\"is_enabled\"" } "json:\"peering\""; PrivateLink struct { Url string "json:\"url\""; State string "json:\"state\"" } "json:\"privateLink\"" }{Type:"", CidrBlock:"", Peering:struct { IsEnabled bool "json:\"is_enabled\"" }{IsEnabled:false}, PrivateLink:struct { Url string "json:\"url\""; State string "json:\"state\"" }{Url:"", State:""}}, DataStructures:models.DataStructureResponse{MapConfigs:[]models.MapConfigResponse{}, JCacheConfigs:[]models.JCacheConfigResponse{}, ReplicatedMapConfigs:[]models.ReplicatedMapConfigResponse{}, QueueConfigs:[]models.QueueConfigResponse{}, SetConfigs:[]models.SetConfigResponse{}, ListConfigs:[]models.ListConfigResponse{}, TopicConfigs:[]models.TopicConfigResponse{}, MultiMapConfigs:[]models.MultiMapConfigResponse{}, RingBufferConfigs:[]models.RingBufferConfigResponse{}, ReliableTopicConfigs:[]models.ReliableTopicConfigResponse{}}}}
Example (Resume) ΒΆ
client, _, _ := New()
cluster, _, _ := client.StarterCluster.Resume(context.Background(), &models.ClusterResumeInput{ClusterId: "53805"})
fmt.Printf("Result: %#v", cluster)
Output:

Result: &models.ClusterId{ClusterId:53805}
Example (Stop) ΒΆ
client, _, _ := New()
cluster, _, _ := client.StarterCluster.Stop(context.Background(), &models.ClusterStopInput{ClusterId: "53805"})
fmt.Printf("Result: %#v", cluster)
Output:

Result: &models.ClusterId{ClusterId:53805}

func NewStarterClusterService ΒΆ

func NewStarterClusterService(client *Client) StarterClusterService

Directories ΒΆ

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL