github.com/opentelekomcloud/gophertelekomcloud@v0.9.3/openstack/dis/v2/checkpoints/DeleteCheckpoint.go (about)

     1  package checkpoints
     2  
     3  import golangsdk "github.com/opentelekomcloud/gophertelekomcloud"
     4  
     5  type DeleteCheckpointOpts struct {
     6  	// Name of the stream to which the checkpoint belongs.
     7  	StreamName string `q:"stream_name"`
     8  	// Name of the application associated with the checkpoint.
     9  	// Minimum: 1
    10  	// Maximum: 50
    11  	AppName string `q:"app_name"`
    12  	// Type of the checkpoint. LAST_READ: Only sequence numbers are recorded in databases.
    13  	// Enumeration values:
    14  	// LAST_READ
    15  	CheckpointType string `q:"checkpoint_type"`
    16  	// Identifier of the stream partition to which the checkpoint belongs. The value can be in either of the following formats:
    17  	// shardId-0000000000
    18  	// 0
    19  	// For example, if a stream has three partitions, the partition identifiers are 0, 1, and 2, and shardId-0000000000, shardId-0000000001, shardId-0000000002, respectively.
    20  	PartitionId string `q:"partition_id,omitempty"`
    21  }
    22  
    23  func DeleteCheckpoint(client *golangsdk.ServiceClient, opts DeleteCheckpointOpts) (err error) {
    24  	url, err := golangsdk.NewURLBuilder().WithEndpoints("checkpoints").WithQueryParams(&opts).Build()
    25  	if err != nil {
    26  		return err
    27  	}
    28  
    29  	// DELETE /v2/{project_id}/checkpoints
    30  	_, err = client.Delete(client.ServiceURL(url.String()), nil)
    31  	return
    32  }