Documentation ¶
Index ¶
- func CreateTaskPath() string
- func DeleteTaskPath(id string) string
- func InspectTaskPath(id string) string
- func ListDatabindPath() string
- func PingMonitoringPath() string
- func StatusSwarmPath() string
- func UploadDatabindPath() string
- type AtqDatabindUpload
- type AtqDatabindUploadCollection
- type AtqDatabindUploadError
- type AtqDatabindUploadErrorCollection
- type AtqService
- type AtqServiceFull
- type AtqServiceMinimal
- type AtqSwarm
- type AtqSwarmError
- type AtqTask
- type AtqTaskFull
- type Client
- func (c *Client) CreateTask(ctx context.Context, path string, payload *TaskPayload) (*http.Response, error)
- func (c *Client) DecodeAtqDatabindUpload(resp *http.Response) (*AtqDatabindUpload, error)
- func (c *Client) DecodeAtqDatabindUploadCollection(resp *http.Response) (AtqDatabindUploadCollection, error)
- func (c *Client) DecodeAtqDatabindUploadError(resp *http.Response) (*AtqDatabindUploadError, error)
- func (c *Client) DecodeAtqDatabindUploadErrorCollection(resp *http.Response) (AtqDatabindUploadErrorCollection, error)
- func (c *Client) DecodeAtqService(resp *http.Response) (*AtqService, error)
- func (c *Client) DecodeAtqServiceFull(resp *http.Response) (*AtqServiceFull, error)
- func (c *Client) DecodeAtqServiceMinimal(resp *http.Response) (*AtqServiceMinimal, error)
- func (c *Client) DecodeAtqSwarm(resp *http.Response) (*AtqSwarm, error)
- func (c *Client) DecodeAtqSwarmError(resp *http.Response) (*AtqSwarmError, error)
- func (c *Client) DecodeAtqTask(resp *http.Response) (*AtqTask, error)
- func (c *Client) DecodeAtqTaskFull(resp *http.Response) (*AtqTaskFull, error)
- func (c *Client) DeleteTask(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) InspectTask(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) ListDatabind(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) NewCreateTaskRequest(ctx context.Context, path string, payload *TaskPayload) (*http.Request, error)
- func (c *Client) NewDeleteTaskRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) NewInspectTaskRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) NewListDatabindRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) NewPingMonitoringRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) NewStatusSwarmRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) NewUploadDatabindRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) PingMonitoring(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) StatusSwarm(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) UploadDatabind(ctx context.Context, path string) (*http.Response, error)
- type JoinTokens
- type ServicePayload
- type TaskPayload
- type WaitCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTaskPath ¶
func CreateTaskPath() string
CreateTaskPath computes a request path to the create action of task.
func DeleteTaskPath ¶
DeleteTaskPath computes a request path to the delete action of task.
func InspectTaskPath ¶
InspectTaskPath computes a request path to the inspect action of task.
func ListDatabindPath ¶
func ListDatabindPath() string
ListDatabindPath computes a request path to the list action of databind.
func PingMonitoringPath ¶
func PingMonitoringPath() string
PingMonitoringPath computes a request path to the ping action of monitoring.
func StatusSwarmPath ¶
func StatusSwarmPath() string
StatusSwarmPath computes a request path to the status action of swarm.
func UploadDatabindPath ¶
func UploadDatabindPath() string
UploadDatabindPath computes a request path to the upload action of databind.
Types ¶
type AtqDatabindUpload ¶
type AtqDatabindUpload struct { // Upload ID ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` }
User upload files response (default view)
Identifier: application/atq.databind.upload+json; view=default
type AtqDatabindUploadCollection ¶
type AtqDatabindUploadCollection []*AtqDatabindUpload
AtqDatabindUploadCollection is the media type for an array of AtqDatabindUpload (default view)
Identifier: application/atq.databind.upload+json; type=collection; view=default
type AtqDatabindUploadError ¶
type AtqDatabindUploadError struct { // Error message if errored Error *string `form:"error,omitempty" json:"error,omitempty" xml:"error,omitempty"` }
User upload files response (error view)
Identifier: application/atq.databind.upload+json; view=error
type AtqDatabindUploadErrorCollection ¶
type AtqDatabindUploadErrorCollection []*AtqDatabindUploadError
AtqDatabindUploadCollection is the media type for an array of AtqDatabindUpload (error view)
Identifier: application/atq.databind.upload+json; type=collection; view=error
type AtqService ¶
type AtqService struct { // ATQ Service internal alias Alias *string `form:"alias,omitempty" json:"alias,omitempty" xml:"alias,omitempty"` // ATQ FileID if exists FileID *string `form:"fileId,omitempty" json:"fileId,omitempty" xml:"fileId,omitempty"` // Docker Service internal identifier ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` }
Created Relevant Service Information (default view)
Identifier: application/atq.service+json; view=default
type AtqServiceFull ¶
type AtqServiceFull struct { // ATQ Service internal alias Alias *string `form:"alias,omitempty" json:"alias,omitempty" xml:"alias,omitempty"` // Arguments passed to the containers Args []string `form:"args,omitempty" json:"args,omitempty" xml:"args,omitempty"` // ATQ FileID if exists FileID *string `form:"fileId,omitempty" json:"fileId,omitempty" xml:"fileId,omitempty"` // Docker Service internal identifier ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // Docker Image Name Image *string `form:"image,omitempty" json:"image,omitempty" xml:"image,omitempty"` // Amount of Replicas Replicas *int `form:"replicas,omitempty" json:"replicas,omitempty" xml:"replicas,omitempty"` // Interactive Shell Tty *bool `form:"tty,omitempty" json:"tty,omitempty" xml:"tty,omitempty"` }
Created Relevant Service Information (full view)
Identifier: application/atq.service+json; view=full
type AtqServiceMinimal ¶
type AtqServiceMinimal struct { // Docker Service internal identifier ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` }
Created Relevant Service Information (minimal view)
Identifier: application/atq.service+json; view=minimal
type AtqSwarm ¶
type AtqSwarm struct {
JoinTokens *JoinTokens `form:"joinTokens,omitempty" json:"joinTokens,omitempty" xml:"joinTokens,omitempty"`
}
Swarm Details (default view)
Identifier: application/atq.swarm+json; view=default
type AtqSwarmError ¶
type AtqSwarmError struct { // Swarm Error Message Error *string `form:"error,omitempty" json:"error,omitempty" xml:"error,omitempty"` }
Swarm Details (error view)
Identifier: application/atq.swarm+json; view=error
type AtqTask ¶
type AtqTask struct { // Task ID ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // Status of the Task Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"` }
Task description (default view)
Identifier: application/atq.task+json; view=default
type AtqTaskFull ¶
type AtqTaskFull struct { // Manual delay between starting Master and Worker services Delay *int `form:"delay,omitempty" json:"delay,omitempty" xml:"delay,omitempty"` // Task ID ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // Master Service definition Master *AtqService `form:"master,omitempty" json:"master,omitempty" xml:"master,omitempty"` // Status of the Task Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"` WaitCommand *WaitCommand `form:"waitCommand,omitempty" json:"waitCommand,omitempty" xml:"waitCommand,omitempty"` // Worker Service definition Worker *AtqService `form:"worker,omitempty" json:"worker,omitempty" xml:"worker,omitempty"` }
Task description (full view)
Identifier: application/atq.task+json; view=full
func (*AtqTaskFull) Validate ¶
func (mt *AtqTaskFull) Validate() (err error)
Validate validates the AtqTaskFull media type instance.
type Client ¶
type Client struct { *goaclient.Client Encoder *goa.HTTPEncoder Decoder *goa.HTTPDecoder }
Client is the ATQ - Director service client.
func (*Client) CreateTask ¶
func (c *Client) CreateTask(ctx context.Context, path string, payload *TaskPayload) (*http.Response, error)
Creates a new Task in the Swarm according with the config provided in the JSON body
func (*Client) DecodeAtqDatabindUpload ¶
func (c *Client) DecodeAtqDatabindUpload(resp *http.Response) (*AtqDatabindUpload, error)
DecodeAtqDatabindUpload decodes the AtqDatabindUpload instance encoded in resp body.
func (*Client) DecodeAtqDatabindUploadCollection ¶
func (c *Client) DecodeAtqDatabindUploadCollection(resp *http.Response) (AtqDatabindUploadCollection, error)
DecodeAtqDatabindUploadCollection decodes the AtqDatabindUploadCollection instance encoded in resp body.
func (*Client) DecodeAtqDatabindUploadError ¶
func (c *Client) DecodeAtqDatabindUploadError(resp *http.Response) (*AtqDatabindUploadError, error)
DecodeAtqDatabindUploadError decodes the AtqDatabindUploadError instance encoded in resp body.
func (*Client) DecodeAtqDatabindUploadErrorCollection ¶
func (c *Client) DecodeAtqDatabindUploadErrorCollection(resp *http.Response) (AtqDatabindUploadErrorCollection, error)
DecodeAtqDatabindUploadErrorCollection decodes the AtqDatabindUploadErrorCollection instance encoded in resp body.
func (*Client) DecodeAtqService ¶
func (c *Client) DecodeAtqService(resp *http.Response) (*AtqService, error)
DecodeAtqService decodes the AtqService instance encoded in resp body.
func (*Client) DecodeAtqServiceFull ¶
func (c *Client) DecodeAtqServiceFull(resp *http.Response) (*AtqServiceFull, error)
DecodeAtqServiceFull decodes the AtqServiceFull instance encoded in resp body.
func (*Client) DecodeAtqServiceMinimal ¶
func (c *Client) DecodeAtqServiceMinimal(resp *http.Response) (*AtqServiceMinimal, error)
DecodeAtqServiceMinimal decodes the AtqServiceMinimal instance encoded in resp body.
func (*Client) DecodeAtqSwarm ¶
DecodeAtqSwarm decodes the AtqSwarm instance encoded in resp body.
func (*Client) DecodeAtqSwarmError ¶
func (c *Client) DecodeAtqSwarmError(resp *http.Response) (*AtqSwarmError, error)
DecodeAtqSwarmError decodes the AtqSwarmError instance encoded in resp body.
func (*Client) DecodeAtqTask ¶
DecodeAtqTask decodes the AtqTask instance encoded in resp body.
func (*Client) DecodeAtqTaskFull ¶
func (c *Client) DecodeAtqTaskFull(resp *http.Response) (*AtqTaskFull, error)
DecodeAtqTaskFull decodes the AtqTaskFull instance encoded in resp body.
func (*Client) DeleteTask ¶
Deletes the Task specified and its components
func (*Client) InspectTask ¶
Get Task's details
func (*Client) ListDatabind ¶
List of uploaded and available files
func (*Client) NewCreateTaskRequest ¶
func (c *Client) NewCreateTaskRequest(ctx context.Context, path string, payload *TaskPayload) (*http.Request, error)
NewCreateTaskRequest create the request corresponding to the create action endpoint of the task resource.
func (*Client) NewDeleteTaskRequest ¶
NewDeleteTaskRequest create the request corresponding to the delete action endpoint of the task resource.
func (*Client) NewInspectTaskRequest ¶
NewInspectTaskRequest create the request corresponding to the inspect action endpoint of the task resource.
func (*Client) NewListDatabindRequest ¶
NewListDatabindRequest create the request corresponding to the list action endpoint of the databind resource.
func (*Client) NewPingMonitoringRequest ¶
NewPingMonitoringRequest create the request corresponding to the ping action endpoint of the monitoring resource.
func (*Client) NewStatusSwarmRequest ¶
NewStatusSwarmRequest create the request corresponding to the status action endpoint of the swarm resource.
func (*Client) NewUploadDatabindRequest ¶
NewUploadDatabindRequest create the request corresponding to the upload action endpoint of the databind resource.
func (*Client) PingMonitoring ¶
Endpoint for pinging and healthcheck purposes
func (*Client) StatusSwarm ¶
Response with the details of the swarm
type JoinTokens ¶
type JoinTokens struct { Manager *string `form:"manager,omitempty" json:"manager,omitempty" xml:"manager,omitempty"` Worker *string `form:"worker,omitempty" json:"worker,omitempty" xml:"worker,omitempty"` }
Docker Swarm Join Tokens
type ServicePayload ¶
type ServicePayload struct { // Service alias, this will identify the Service Alias string `form:"alias" json:"alias" xml:"alias"` // Arguments to be passed to the container Args []string `form:"args,omitempty" json:"args,omitempty" xml:"args,omitempty"` // Environment variables list Environment []string `form:"environment,omitempty" json:"environment,omitempty" xml:"environment,omitempty"` // ID of the Zipped contents that will be mounted and accesible inside the container, PREVIOUSLY UPLOADED Fileid *string `form:"fileid,omitempty" json:"fileid,omitempty" xml:"fileid,omitempty"` // Docker base image to attach to Service Image string `form:"image" json:"image" xml:"image"` // Amount of replicas to be deployed. (1 by default) Replicas *int `form:"replicas,omitempty" json:"replicas,omitempty" xml:"replicas,omitempty"` // Interactive shell requirement Tty *bool `form:"tty,omitempty" json:"tty,omitempty" xml:"tty,omitempty"` }
ServicePayload user type.
func (*ServicePayload) Validate ¶
func (ut *ServicePayload) Validate() (err error)
Validate validates the ServicePayload type instance.
type TaskPayload ¶
type TaskPayload struct { Delay *int `form:"delay,omitempty" json:"delay,omitempty" xml:"delay,omitempty"` Master *ServicePayload `form:"master" json:"master" xml:"master"` // Task Name Identifier Name string `form:"name" json:"name" xml:"name"` WaitCommand *WaitCommand `form:"waitCommand,omitempty" json:"waitCommand,omitempty" xml:"waitCommand,omitempty"` Worker *ServicePayload `form:"worker" json:"worker" xml:"worker"` }
TaskPayload user type.
func (*TaskPayload) Validate ¶
func (ut *TaskPayload) Validate() (err error)
Validate validates the TaskPayload type instance.
type WaitCommand ¶
type WaitCommand struct { // Command to be executed Command *string `form:"command,omitempty" json:"command,omitempty" xml:"command,omitempty"` // Result expected ExpectedResult *string `form:"expectedResult,omitempty" json:"expectedResult,omitempty" xml:"expectedResult,omitempty"` // Maximum seconds to wait until succesfull response Timeout *int `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"` }
Definition of a command to be executed