Documentation ¶
Index ¶
- Constants
- Variables
- func FilterOperations(ops Operations, kind Kind) (result []interface{}, err error)
- func ParseOperation(operation OperationResponse, kind Kind) (interface{}, error)
- func SidecarClients(pods []corev1.Pod, clientOptions *ClientOptions) map[*corev1.Pod]*Client
- type BackupRequest
- type BackupResponse
- type BasicResponse
- type CleanupOperationResponse
- type CleanupRequest
- type Client
- func (client *Client) FindBackup(id uuid.UUID) (backupResponse *BackupResponse, err error)
- func (client *Client) GetFilteredOperations(filter *OperationsFilter) (*Operations, error)
- func (client *Client) GetOperation(id uuid.UUID) (*OperationResponse, error)
- func (client *Client) GetOperations() (*Operations, error)
- func (client *Client) ListBackups() ([]*BackupResponse, error)
- func (client *Client) ListCleanups() ([]*CleanupOperationResponse, error)
- func (client *Client) StartOperation(request OperationRequest) (uuid.UUID, error)
- func (client *Client) Status() (*nodestate.Status, error)
- type ClientOptions
- type DecommissionOperationResponse
- type DecommissionRequest
- type HttpResponse
- type Kind
- type Operation
- type OperationRequest
- type OperationResponse
- type Operations
- type OperationsFilter
- type RebuildRequest
- type RebuildResponse
- type ScrubRequest
- type ScrubResponse
- type TokenRange
- type UpgradeSSTablesRequest
- type UpgradeSSTablesResponse
Constants ¶
View Source
const ( EndpointOperations = "operations" EndpointStatus = "status" )
Variables ¶
View Source
var DefaultSidecarClientOptions = ClientOptions{Port: 4567, Secure: false}
Functions ¶
func FilterOperations ¶
func FilterOperations(ops Operations, kind Kind) (result []interface{}, err error)
func ParseOperation ¶
func ParseOperation(operation OperationResponse, kind Kind) (interface{}, error)
func SidecarClients ¶
Types ¶
type BackupRequest ¶
type BackupRequest struct { Operation StorageLocation string `json:"storageLocation"` SnapshotTag string `json:"snapshotTag,omitempty"` ConcurrentConnections int `json:"concurrentConnections,omitempty"` Entities string `json:"entities,omitempty"` Secret string `json:"k8sSecretName"` KubernetesNamespace string `json:"k8sNamespace"` GlobalRequest bool `json:"globalRequest,omitempty"` CreateMissingBucket bool `json:"createMissingBucket,omitempty"` SkipBucketVerification bool `json:"skipBucketVerification,omitempty"` MetadataDirective string `json:"metadataDirective,omitempty"` Insecure bool `json:"insecure,omitempty"` }
func (*BackupRequest) Init ¶
func (b *BackupRequest) Init()
type BackupResponse ¶
type BackupResponse struct { BasicResponse BackupRequest }
backup Operations
func (*BackupResponse) String ¶
func (b *BackupResponse) String() string
type BasicResponse ¶
type CleanupOperationResponse ¶
type CleanupOperationResponse struct { BasicResponse CleanupRequest }
cleanup Operations
func (*CleanupOperationResponse) String ¶
func (c *CleanupOperationResponse) String() string
type CleanupRequest ¶
type CleanupRequest struct { Operation Jobs int32 `json:"jobs,omitempty"` Tables []string `json:"tables,omitempty"` Keyspace string `json:"keyspace"` }
func (*CleanupRequest) Init ¶
func (c *CleanupRequest) Init()
type Client ¶
type Client struct { Host string Options *ClientOptions // contains filtered or unexported fields }
func ClientFromPods ¶
func NewSidecarClient ¶
func NewSidecarClient(host string, options *ClientOptions) *Client
func (*Client) FindBackup ¶
func (client *Client) FindBackup(id uuid.UUID) (backupResponse *BackupResponse, err error)
func (*Client) GetFilteredOperations ¶
func (client *Client) GetFilteredOperations(filter *OperationsFilter) (*Operations, error)
func (*Client) GetOperation ¶
func (client *Client) GetOperation(id uuid.UUID) (*OperationResponse, error)
func (*Client) GetOperations ¶
func (client *Client) GetOperations() (*Operations, error)
func (*Client) ListBackups ¶
func (client *Client) ListBackups() ([]*BackupResponse, error)
func (*Client) ListCleanups ¶
func (client *Client) ListCleanups() ([]*CleanupOperationResponse, error)
func (*Client) StartOperation ¶
func (client *Client) StartOperation(request OperationRequest) (uuid.UUID, error)
type DecommissionOperationResponse ¶
type DecommissionOperationResponse struct { BasicResponse DecommissionRequest }
decommission Operations
type DecommissionRequest ¶
type DecommissionRequest struct {
Operation
}
func (*DecommissionRequest) Init ¶
func (d *DecommissionRequest) Init()
type HttpResponse ¶
type HttpResponse struct {
// contains filtered or unexported fields
}
func (*HttpResponse) Error ¶
func (e *HttpResponse) Error() string
type Kind ¶
type Kind int
func (Kind) MarshalJSON ¶
MarshalJSON is generated so Kind satisfies json.Marshaler.
func (*Kind) UnmarshalJSON ¶
UnmarshalJSON is generated so Kind satisfies json.Unmarshaler.
type OperationRequest ¶
type OperationRequest interface {
Init()
}
type OperationResponse ¶
type OperationResponse map[string]interface{}
type Operations ¶
type Operations []OperationResponse
type OperationsFilter ¶
type OperationsFilter struct { Types []Kind States []operations.OperationState }
type RebuildRequest ¶
type RebuildRequest struct { Operation SourceDC string `json:"sourceDC,omitempty"` Keyspace string `json:"keyspace"` SpecificSources []string `json:"specificSources,omitempty"` SpecificTokens []TokenRange `json:"specificTokens,omitempty"` }
func (*RebuildRequest) Init ¶
func (r *RebuildRequest) Init()
type ScrubRequest ¶
type ScrubRequest struct { Operation DisableSnapshot bool `json:"disableSnapshot,omitempty"` SkipCorrupted bool `json:"skipCorrupted,omitempty"` NoValidate bool `json:"noValidate,omitempty"` ReinsertOverflowedTTL bool `json:"reinsertOverflowedTTL,omitempty"` Jobs int32 `json:"jobs,omitempty"` Tables []string `json:"tables,omitempty"` Keyspace string `json:"keyspace"` }
func (*ScrubRequest) Init ¶
func (s *ScrubRequest) Init()
type TokenRange ¶
type UpgradeSSTablesRequest ¶
type UpgradeSSTablesRequest struct { Operation IncludeAllSSTables bool `json:"includeAllSSTables,omitempty"` Jobs int32 `json:"jobs,omitempty"` Tables []string `json:"tables,omitempty"` Keyspace string `json:"keyspace"` }
func (*UpgradeSSTablesRequest) Init ¶
func (u *UpgradeSSTablesRequest) Init()
type UpgradeSSTablesResponse ¶
type UpgradeSSTablesResponse struct { BasicResponse UpgradeSSTablesRequest }
UpgradeSSTables
Click to show internal directories.
Click to hide internal directories.