Documentation ¶
Overview ¶
Package dblabapi provides a client for Database Lab HTTP API.
Index ¶
- type Client
- func (c *Client) CreateClone(ctx context.Context, cloneRequest types.CloneCreateRequest) (*models.Clone, error)
- func (c *Client) CreateCloneAsync(ctx context.Context, cloneRequest types.CloneCreateRequest) (*models.Clone, error)
- func (c *Client) DestroyClone(ctx context.Context, cloneID string) error
- func (c *Client) DestroyCloneAsync(ctx context.Context, cloneID string) error
- func (c *Client) Do(ctx context.Context, request *http.Request) (response *http.Response, err error)
- func (c *Client) DownloadArtifact(ctx context.Context, cloneID, sessionID, artifactType string) (io.ReadCloser, error)
- func (c *Client) Estimate(ctx context.Context, cloneID, pid string) (*EstimatorClient, error)
- func (c *Client) GetClone(ctx context.Context, cloneID string) (*models.Clone, error)
- func (c *Client) Health(ctx context.Context) (*models.Health, error)
- func (c *Client) ListClones(ctx context.Context) ([]*models.Clone, error)
- func (c *Client) ListSnapshots(ctx context.Context) ([]*models.Snapshot, error)
- func (c *Client) ResetClone(ctx context.Context, cloneID string) error
- func (c *Client) ResetCloneAsync(ctx context.Context, cloneID string) error
- func (c *Client) StartObservation(ctx context.Context, startRequest types.StartObservationRequest) (*observer.Session, error)
- func (c *Client) Status(ctx context.Context) (*models.InstanceStatus, error)
- func (c *Client) StopObservation(ctx context.Context, stopRequest types.StopObservationRequest) (*observer.Session, error)
- func (c *Client) SummaryObservation(ctx context.Context, cloneID, sessionID string) (*observer.SummaryArtifact, error)
- func (c *Client) URL(endpoint string) *url.URL
- func (c *Client) UpdateClone(ctx context.Context, cloneID string, updateRequest types.CloneUpdateRequest) (*models.Clone, error)
- type EstimatorClient
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides a Database Lab API client.
func (*Client) CreateClone ¶
func (c *Client) CreateClone(ctx context.Context, cloneRequest types.CloneCreateRequest) (*models.Clone, error)
CreateClone creates a new Database Lab clone.
func (*Client) CreateCloneAsync ¶
func (c *Client) CreateCloneAsync(ctx context.Context, cloneRequest types.CloneCreateRequest) (*models.Clone, error)
CreateCloneAsync asynchronously creates a new Database Lab clone.
func (*Client) DestroyClone ¶
DestroyClone destroys a Database Lab clone.
func (*Client) DestroyCloneAsync ¶
DestroyCloneAsync asynchronously destroys a Database Lab clone.
func (*Client) Do ¶
func (c *Client) Do(ctx context.Context, request *http.Request) (response *http.Response, err error)
Do makes an HTTP request.
func (*Client) DownloadArtifact ¶ added in v2.4.0
func (c *Client) DownloadArtifact(ctx context.Context, cloneID, sessionID, artifactType string) (io.ReadCloser, error)
DownloadArtifact downloads clone observation artifacts.
func (*Client) ListClones ¶
ListClones provides a list of Database Lab clones.
func (*Client) ListSnapshots ¶
ListSnapshots provides a snapshot list.
func (*Client) ResetClone ¶
ResetClone resets a Database Lab clone session.
func (*Client) ResetCloneAsync ¶
ResetCloneAsync asynchronously resets a Database Lab clone session.
func (*Client) StartObservation ¶
func (c *Client) StartObservation(ctx context.Context, startRequest types.StartObservationRequest) (*observer.Session, error)
StartObservation starts a new clone observation.
func (*Client) StopObservation ¶
func (c *Client) StopObservation(ctx context.Context, stopRequest types.StopObservationRequest) (*observer.Session, error)
StopObservation stops the clone observation.
func (*Client) SummaryObservation ¶ added in v2.4.0
func (c *Client) SummaryObservation(ctx context.Context, cloneID, sessionID string) (*observer.SummaryArtifact, error)
SummaryObservation returns the summary of clone observation.
type EstimatorClient ¶ added in v2.4.0
type EstimatorClient struct {
// contains filtered or unexported fields
}
EstimatorClient defines a client to perform timing estimation.
func (*EstimatorClient) Close ¶ added in v2.4.0
func (e *EstimatorClient) Close() error
Close closes connection.
func (*EstimatorClient) ReadResult ¶ added in v2.4.0
func (e *EstimatorClient) ReadResult() estimator.Result
ReadResult returns estimation results.
func (*EstimatorClient) SetReadBlocks ¶ added in v2.4.0
func (e *EstimatorClient) SetReadBlocks(readBlocks uint64) error
SetReadBlocks sends a number of read blocks.
func (*EstimatorClient) Wait ¶ added in v2.4.0
func (e *EstimatorClient) Wait() chan struct{}
Wait waits for connection readiness.