container

package
v0.0.0-...-2263012 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeployPayload

type DeployPayload struct {
	Action  string            `json:"action"`
	Secrets map[string]string `json:"secrets,omitempty"`
	Params  map[string]any    `json:"params,omitempty"`
	Image   string            `json:"image,omitempty"`
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(baseDir string, dockerCLI *client.Client) *Handler

func (*Handler) Deploy

func (h *Handler) Deploy(w http.ResponseWriter, r *http.Request)

Deploy runs the provisioner container locally

@Summary		Deploy the bundle
@Description	Deploy runs the local provisioner to deploy the bundle
@ID				deploy-container
@Accept			json
@Success		200				{object}	container.deployReply
@Param			deployPayload	body		container.DeployPayload	true	"DeployPayload"
@Router			/bundle/deploy [post]

func (*Handler) List

func (h *Handler) List(w http.ResponseWriter, r *http.Request)

List lists containers

@Summary		List containers
@Description	List containers searches using the name param, defaults to 'mass' if none provided.
@ID				list-containers
@Produce		json
@Param			all		query	bool	false	"all containers, even stopped"				default(false)
@Param			limit	query	int		false	"number of containers to return, 0 is all"	default(0)
@Param			name	query	string	false	"name of container to search with"			default(mass)
@Success		200		{array}	types.Container
@Router			/containers/list [get]

func (*Handler) StreamLogs

func (h *Handler) StreamLogs(w http.ResponseWriter, r *http.Request)

StreamLogs opens a websocket to stream the logs of a container

@Summary		Stream logs
@Description	Stream the logs from a container using a websocket
@ID				stream-logs
@Produce		plain
@Param			id	query	string	true	"id of the container"
@Success		101
@Router			/containers/logs [get]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL