Documentation
¶
Index ¶
- Variables
- type Client
- func (c *Client) Close() error
- func (c *Client) ProvisionHandshake(ctx context.Context, us userstr.UserStr, timeout int32) (workspaceName string, jobID string, ...)
- func (c *Client) StartHandshake(ctx context.Context, workspaceName string, timeout int32) (jobWorkspaceName string, jobID string, ...)
- func (c *Client) StartHandshakeForce(ctx context.Context, workspaceName string, timeout int32, force bool) (jobWorkspaceName string, jobID string, ...)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidArgument = errors.New("invalid argument")
View Source
var ErrPermissionDenied = errors.New("permission denied")
View Source
var ErrWorkspaceExists = errors.New("workspace already exists")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
provisionerv1.ProvisionerServiceClient
// contains filtered or unexported fields
}
func (*Client) ProvisionHandshake ¶
func (c *Client) ProvisionHandshake(ctx context.Context, us userstr.UserStr, timeout int32) (workspaceName string, jobID string, stream grpc.ServerStreamingClient[provisionerv1.ProvisionWorkspaceResponse], err error)
ProvisionHandshake reads the first stream event that needs to be handshake.
func (*Client) StartHandshake ¶ added in v0.35.0
func (c *Client) StartHandshake(ctx context.Context, workspaceName string, timeout int32) (jobWorkspaceName string, jobID string, stream grpc.ServerStreamingClient[provisionerv1.ProvisionWorkspaceResponse], err error)
StartHandshake reads the first stream event that needs to be handshake, for resuming a previously stopped workspace.
func (*Client) StartHandshakeForce ¶ added in v0.65.6
func (c *Client) StartHandshakeForce(ctx context.Context, workspaceName string, timeout int32, force bool) (jobWorkspaceName string, jobID string, stream grpc.ServerStreamingClient[provisionerv1.ProvisionWorkspaceResponse], err error)
StartHandshakeForce is StartHandshake with the provisioner's force flag: a forced start also starts a workspace past its schedule expiry, giving it the provisioner's default new expiry (no "to" is sent). The provisioner does not authorize force, so callers must only pass true for an authorized user.
Click to show internal directories.
Click to hide internal directories.