apps

package
v0.0.0-...-55b2a28 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Overview

Package apps provides methods for managing drycc apps.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoLogs = errors.New(
	`There are currently no log messages. Please check the following things:
1) Logger and fluentd pods are running: kubectl --namespace=drycc get pods.
2) The application is writing logs to the logger component by checking that an entry in the ring buffer was created: kubectl --namespace=drycc logs <logger pod>
3) Making sure that the container logs were mounted properly into the fluentd pod: kubectl --namespace=drycc exec <fluentd pod> ls /var/log/containers
3a) If the above command returns saying /var/log/containers cannot be found then please see the following github issue for a workaround: https://github.com/drycc/logger/issues/50`)

ErrNoLogs is returned when logs are missing from an app.

Functions

func Delete

func Delete(c *drycc.Client, appID string) error

Delete an app.

func Get

func Get(c *drycc.Client, appID string) (api.App, error)

Get app details from a controller.

func List

func List(c *drycc.Client, results int) (api.Apps, int, error)

List lists apps on a Drycc controller.

func Logs

func Logs(c *drycc.Client, appID string, request api.AppLogsRequest) (*websocket.Conn, error)

Logs retrieves logs from an app. The number of log lines fetched can be set by the lines argument. Setting lines = -1 will retrieve all app logs.

func New

func New(c *drycc.Client, appID string) (api.App, error)

New creates a new app with the given appID. Passing an empty string will result in a randomized app name.

If the app name already exists, the error drycc.ErrDuplicateApp will be returned.

func Run

func Run(c *drycc.Client, appID string, command string, volumes map[string]interface{}, timeout, expires uint32) error

Run a one-time command in your app. This will start a kubernetes job with the same container image and environment as the rest of the app.

func Transfer

func Transfer(c *drycc.Client, appID string, username string) error

Transfer an app to another user.

Types

This section is empty.

Jump to

Keyboard shortcuts

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